mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Manish Katiyar <mkatiyar@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] Remove errors caught by checkpatch.pl in kernel/signal.c
Date: Sun, 15 Feb 2009 21:08:50 +0100	[thread overview]
Message-ID: <20090215200850.GA28011@elte.hu> (raw)
In-Reply-To: <ea11fea30902151107i5fbc523ejcbe9044c6f4bc20d@mail.gmail.com>


* Manish Katiyar <mkatiyar@gmail.com> 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@gmail.com>
> ---
>  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

      reply	other threads:[~2009-02-15 20:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15 19:07 Manish Katiyar
2009-02-15 20:08 ` Ingo Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090215200850.GA28011@elte.hu \
    --to=mingo@elte.hu \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkatiyar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome