lkml.org 
[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] driver core: fix statics initilisation
I guess this patch will be ignored. I will drop it then.

Thanks for the discussion.

On Tue, Apr 16, 2019 at 10:50:23am +0200, Rafael J. Wysocki wrote:
> On Mon, Apr 15, 2019 at 5:29 PM Willy Wolff <willy.mh.wolff.ml@gmail.com> wrote:
> >
> > Thank you for your review.
> >
> > I follow https://kernelnewbies.org/FirstKernelPatch to write this patch.
> > It's not stated that checkpatch.pl is for new patches only. Moreover,
> > https://kernelnewbies.org/FirstKernelPatch#Running_checkpatch.pl suggest to
> > run over the entire file.
>
> I'm not sure about the source of that recommendation.
>
> In any case, running it over the entire file doesn't mean that you
> should or even need to make all of the warnings in that file go away.
>

I understand that, but it was shown as ERROR. There are some other warnings for
long lines that I skip.

> > Also, uninitialised static global variable are initialised to 0 by default.
> > Thus, initialising driver_deferred_probe_enable to false (which is 0) is
> > redundant.
>
> Yes, it is redundant, but it also is harmless AFAICS.
>
> > As my knowledge, initialised global goes to .data section, and uninitialised
> > goes to .bss.
> >
> > What does it mean for the kernel? Is this still hold?
>
> No, I don't think so.
>
> > Are performance or memory footprint of the kernel be affected?
>
> No, they aren't.
>
> The only difference this makes is the removal of redundant
> initialization to 0, which may be regarded as a cleanup, but not as a
> fix IMO.

Ok, will stated as a cleanup in the future.

>
> If that's the only reason you have to change the file in question,
> doing something else instead of that may be a better allocation of
> your time.

Thank you for your advice. I was just having my nose on it while playing with
something else, it wasn't a hide-and-seek game.

>
> Thanks!

\
 
 \ /
  Last update: 2019-04-16 13:35    [W:0.041 / U:25.212 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site