[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f1bce5f03476409fa78920bddf4b4c06@huawei.com>
Date: Mon, 26 Oct 2020 02:20:53 +0000
From: zhangqilong <zhangqilong3@...wei.com>
To: Joe Perches <joe@...ches.com>, Vasily Averin <vvs@...tuozzo.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>
CC: "lirongqing@...du.com" <lirongqing@...du.com>,
"roopa@...ulusnetworks.com" <roopa@...ulusnetworks.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: 答复: [PATCH -next] neigh: remove the extra slash
> On Fri, 2020-10-23 at 13:16 +0300, Vasily Averin wrote:
> > On 10/23/20 1:01 PM, Zhang Qilong wrote:
> > > The normal path has only one slash.
> >
> > it is not normal path
> > this string is used to calculate number of symbols in
> > "net/%s/neigh/%s" used below
>
> Then probably better would be to add +1 rather than use a rather odd filename.
Hi, Joe
I use the splicing method to rewrite it in patch V2 [0001-neigh-Adjustment-calculation-method-of-neighbour-pat.patch], I think it will be clearer. Looking forward to your reply.
Thanks, best wish to you.
Zhang Qilong
>
> > > diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> []
> > > @@ -3623,7 +3623,7 @@ int neigh_sysctl_register(struct net_device *dev,
> struct neigh_parms *p,
> > > int i;
> > > struct neigh_sysctl_table *t;
> > > const char *dev_name_source;
> > > - char neigh_path[ sizeof("net//neigh/") + IFNAMSIZ + IFNAMSIZ ];
> > > + char neigh_path[sizeof("net/neigh/") + IFNAMSIZ + IFNAMSIZ];
> > > char *p_name;
> > >
> > >
> > > t = kmemdup(&neigh_sysctl_template, sizeof(*t), GFP_KERNEL);
> > >
>
Powered by blists - more mailing lists