[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADfD8zwoGUw4aJ8ebz9sLYyZSGp8Au6y5QvpFPvV9Rc4HY_Aw@mail.gmail.com>
Date: Mon, 9 May 2022 20:48:39 +0400
From: Ozgur <ozgurk@...e.org>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Colin Ian King <colin.i.king@...il.com>,
Martin Schiller <ms@....tdt.de>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, linux-x25@...r.kernel.org,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x25: remove redundant pointer dev
On Mon, May 9, 2022 at 4:44 PM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> On Mon, May 09, 2022 at 04:57:40AM +0400, Ozgur wrote:
> > On Mon, May 9, 2022 at 1:45 AM Colin Ian King <colin.i.king@...il.com> wrote:
> > >
> > > Pointer dev is being assigned a value that is never used, the assignment
> > > and the variable are redundant and can be removed. Also replace null check
> > > with the preferred !ptr idiom.
> > >
> >
> > Hello,
> >
> > *dev pointer is device assign global linked list and shouldnt be
> > touched by the driver so *dev wont get any value right?
>
> Why are you talking about "*dev" instead of "dev"?
>
Hi Dan,
I just realized this, i thought dev was necessary for launch functions
device and to activate.
if carries this with x25, dev is useless I understand.
> > Also seems to use this while network interface is initializing because
> > some activation information and stats information is also kept here,
> > for example, open *dev will call when ifconfig is called from.
> >
> > route, link, forward these inital activate and move all values with
> > net_device *dev?
>
> It's not clear what you are saying...
>
> When I review these kinds of patches I ask:
> 1) Does Colin's patch change run time behavior? Obviosly not.
> 2) Is the current code buggy? Sometimes when there is a static checker
> warning it indicates a typo in the code. I do not see a bug in the
> original code before Colin's patch.
> 3) What was the author's original intent? This code predates git but
> I think the "dev" was just a going to be a shorter name to type than
> "x25->neighbour->dev".
Actually i thought similarly because when this patch remove dev from i
thought would depend on
other source code whose x25 interface will be implemented are not ready.
I thought any x25 interface or x25route was using it.
> I honestly have no idea what you are saying. At first I thought you
> might be saying that this is stub code. But that seems wrong. Also we
> do not allow stub code in the kernel.
thanks for enlightening,
Regards
> regards,
> dan carpenter
>
--
Ozgur Kara
Linux Kernel Developer
ozgurk@...e.org
Powered by blists - more mailing lists