From f61b6db378539e69d8525a1b5001637df1e13040 Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Thu, 26 Jul 2018 14:25:26 -0700 Subject: [PATCH] netdevsim: make debug dirs' dentries static The root directories of netdevsim should only be used by the core to create per-device subdirectories, so limit their visibility to the core file. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller --- drivers/net/netdevsim/netdev.c | 6 +++--- drivers/net/netdevsim/netdevsim.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c index 2d244551298b..8d8e2b3f263e 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -41,6 +41,9 @@ struct nsim_vf_config { static u32 nsim_dev_id; +static struct dentry *nsim_ddir; +static struct dentry *nsim_sdev_ddir; + static int nsim_num_vf(struct device *dev) { struct netdevsim *ns = to_nsim(dev); @@ -566,9 +569,6 @@ static struct rtnl_link_ops nsim_link_ops __read_mostly = { .dellink = nsim_dellink, }; -struct dentry *nsim_ddir; -struct dentry *nsim_sdev_ddir; - static int __init nsim_module_init(void) { int err; diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h index 02be199eb005..384c254fafc5 100644 --- a/drivers/net/netdevsim/netdevsim.h +++ b/drivers/net/netdevsim/netdevsim.h @@ -103,9 +103,6 @@ struct netdevsim { struct nsim_ipsec ipsec; }; -extern struct dentry *nsim_ddir; -extern struct dentry *nsim_sdev_ddir; - #ifdef CONFIG_BPF_SYSCALL int nsim_bpf_init(struct netdevsim *ns); void nsim_bpf_uninit(struct netdevsim *ns); -- 2.30.2