lkml.org 
[lkml]   [2019]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] driver core: fix statics initilisation
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.

Also, uninitialised static global variable are initialised to 0 by default.
Thus, initialising driver_deferred_probe_enable to false (which is 0) is
redundant.

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?
Are performance or memory footprint of the kernel be affected?
Please, clarify my knowledge of C and kernel developement if I'm wrong.

I think checkpatch.pl should mention that information as a reminder.

Best Regards,
Willy

On Mon, Apr 15, 2019 at 10:12:43AM +0200, Rafael J. Wysocki wrote:
> On Fri, Apr 12, 2019 at 5:48 PM Willy Wolff <willy.mh.wolff.ml@gmail.com> wrote:
> >
> > perl scripts/checkpatch.pl -f drivers/base/dd.c got red here:
>
> Please note that checkpatch.pl is for new patches. Running it against
> the existing code base is questionable and so the results of that.

\
 
 \ /
  Last update: 2019-04-15 17:30    [W:0.060 / U:0.948 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site