Revert "rdma: make local functions static"

This reverts commit e99c4443ae.

Patch added to iproute2-master breaks builds of -next because of a
more recent patch in -next that relies on the exports. Revert the
offending patch. Unfortunately this leaves a window where builds
break.

Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
David Ahern 2018-11-24 07:06:17 -08:00
parent 0868c8ab07
commit 6ae54b1326
2 changed files with 17 additions and 6 deletions

View File

@ -74,6 +74,13 @@ struct rd_cmd {
int (*func)(struct rd *rd);
};
/*
* Parser interface
*/
bool rd_no_arg(struct rd *rd);
void rd_arg_inc(struct rd *rd);
char *rd_argv(struct rd *rd);
/*
* Commands interface
@ -89,6 +96,8 @@ void rd_free(struct rd *rd);
int rd_set_arg_to_devname(struct rd *rd);
int rd_argc(struct rd *rd);
int strcmpx(const char *str1, const char *str2);
/*
* Device manipulation
*/
@ -109,12 +118,14 @@ int rd_recv_msg(struct rd *rd, mnl_cb_t callback, void *data, uint32_t seq);
void rd_prepare_msg(struct rd *rd, uint32_t cmd, uint32_t *seq, uint16_t flags);
int rd_dev_init_cb(const struct nlmsghdr *nlh, void *data);
int rd_attr_cb(const struct nlattr *attr, void *data);
int rd_attr_check(const struct nlattr *attr, int *typep);
/*
* Print helpers
*/
void print_driver_table(struct rd *rd, struct nlattr *tb);
void newline(struct rd *rd);
void newline_indent(struct rd *rd);
#define MAX_LINE_LENGTH 80
#endif /* _RDMA_TOOL_H_ */

View File

@ -18,14 +18,14 @@ int rd_argc(struct rd *rd)
return rd->argc;
}
static char *rd_argv(struct rd *rd)
char *rd_argv(struct rd *rd)
{
if (!rd_argc(rd))
return NULL;
return *rd->argv;
}
static int strcmpx(const char *str1, const char *str2)
int strcmpx(const char *str1, const char *str2)
{
if (strlen(str1) > strlen(str2))
return -1;
@ -39,7 +39,7 @@ static bool rd_argv_match(struct rd *rd, const char *pattern)
return strcmpx(rd_argv(rd), pattern) == 0;
}
static void rd_arg_inc(struct rd *rd)
void rd_arg_inc(struct rd *rd)
{
if (!rd_argc(rd))
return;
@ -47,7 +47,7 @@ static void rd_arg_inc(struct rd *rd)
rd->argv++;
}
static bool rd_no_arg(struct rd *rd)
bool rd_no_arg(struct rd *rd)
{
return rd_argc(rd) == 0;
}
@ -404,7 +404,7 @@ static const enum mnl_attr_data_type nldev_policy[RDMA_NLDEV_ATTR_MAX] = {
[RDMA_NLDEV_ATTR_DRIVER_U64] = MNL_TYPE_U64,
};
static int rd_attr_check(const struct nlattr *attr, int *typep)
int rd_attr_check(const struct nlattr *attr, int *typep)
{
int type;
@ -706,7 +706,7 @@ void newline(struct rd *rd)
pr_out("\n");
}
static void newline_indent(struct rd *rd)
void newline_indent(struct rd *rd)
{
newline(rd);
if (!rd->json_output)