Re: [PATCH] Remove errors caught by checkpatch.pl in kernel/signal.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Manish Katiyar <mkatiyar@xxxxxxxxx> wrote:

> Hi,
> 
> Below patch removes some errors generated by checkpatch.pl in
> kernel/signal.c. Caught by Ingo's code-quality script.
> 
> 
> Signed-off-by: Manish Katiyar <mkatiyar@xxxxxxxxx>
> ---
>  kernel/signal.c |   47 +++++++++++++++++++++++------------------------
>  1 files changed, 23 insertions(+), 24 deletions(-)

Note, your patch has line-wrap problems, such as:

> +++ b/kernel/signal.c
> @@ -89,20 +89,20 @@ static inline int has_pending_signals(sigset_t
> *signal, sigset_t *blocked)
>  	switch (_NSIG_WORDS) {

Causing:

 patch: **** malformed patch at line 23: *signal, sigset_t *blocked)

See Documentation/email-clients.txt.

Also, kernel/signal.c needs a thorough cleanup, and your patch only
handles about a third of the errors+warnings:

 before: total: 61 errors, 28 warnings, 3 checks, 2615 lines checked
  after: total: 30 errors, 24 warnings, 3 checks, 2614 lines checked

If then it's best to bring the count down very close to zero (so
that only the obvious checkpatch false positives are left), and also
have a really good human-coder look at signal.c's:

 - structure and code flow
 - variable naming
 - include files section
 - general splitup and function ordering
 - comment style consistency

etc. - to turn it into a really modern, nice-to-look-at and hackable
Linux kernel file.

The checkpatch motivated cleanups really only tell us half of the
story that is usually in such a long-forgotten file - and by fixing
the checkpatch warnings only it gives us a false impression of
cleanliness. So the checkpatch fixes should go hand in hand with
more grounds-up cleanups. (which can all still stay at the pure
style level, so that the .o output does not change - for easy
verification.)

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux