Skip to content

Commit 1dfc266

Browse files
Colin Ian Kingdavem330
authored andcommitted
netdevsim: make functions nsim_bpf_create_prog and nsim_bpf_destroy_prog static
Functions nsim_bpf_create_prog and nsim_bpf_destroy_prog are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'nsim_bpf_create_prog' was not declared. Should it be static? symbol 'nsim_bpf_destroy_prog' was not declared. Should it be static? Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 75223d8 commit 1dfc266

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/netdevsim

1 file changed

+2
-2
lines changed

drivers/net/netdevsim/bpf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static int nsim_xdp_set_prog(struct netdevsim *ns, struct netdev_bpf *bpf)
197197
return 0;
198198
}
199199

200-
int nsim_bpf_create_prog(struct netdevsim *ns, struct bpf_prog *prog)
200+
static int nsim_bpf_create_prog(struct netdevsim *ns, struct bpf_prog *prog)
201201
{
202202
struct nsim_bpf_bound_prog *state;
203203
char name[16];
@@ -232,7 +232,7 @@ int nsim_bpf_create_prog(struct netdevsim *ns, struct bpf_prog *prog)
232232
return 0;
233233
}
234234

235-
void nsim_bpf_destroy_prog(struct bpf_prog *prog)
235+
static void nsim_bpf_destroy_prog(struct bpf_prog *prog)
236236
{
237237
struct nsim_bpf_bound_prog *state;
238238

0 commit comments

Comments
 (0)