Re: [PATCH] net: ipv4: remove redundant initialization in inet_rtm_deladdr

From: Menglong Dong
Date: Sat Nov 07 2020 - 19:43:15 EST


Dear Jakub,

On Sun, Nov 8, 2020 at 7:48 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Fri, 6 Nov 2020 01:42:37 -0500 menglong8.dong@xxxxxxxxx wrote:
> > From: Menglong Dong <dong.menglong@xxxxxxxxxx>
> >
> > The initialization for 'err' with '-EINVAL' is redundant and
> > can be removed, as it is updated soon.
> >
> > Signed-off-by: Menglong Dong <dong.menglong@xxxxxxxxxx>
>
> How many changes like this are there in the kernel right now?
>
> I'm afraid that if there are too many it's not worth the effort.
>
> Also - what tool do you use to find those, we need to make sure new
> instances don't get into the tree.
>

I didn't use any tools. Maybe some general tools, such as kw,
coverity, coccicheck,
are able to find these changes(as far as I know, they can).

In fact, I find these changes by my eyes. I believe 'err' is the most
likely victim
and checked every usage of it in 'net' directory. Here are all the
changes I found,
and I think there won't be too many.

Cheers,
Menglong Dong