All of lore.kernel.org
 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
Date: Sun, 15 Feb 2009 20:08:50 +0000	[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

WARNING: multiple messages have this Message-ID (diff)
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:08 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15 19:07 [PATCH] Remove errors caught by checkpatch.pl in kernel/signal.c Manish Katiyar
2009-02-15 19:19 ` Manish Katiyar
2009-02-15 20:08 ` Ingo Molnar [this message]
2009-02-15 20:08   ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2009-02-15 18:50 [PATCH] Remove errors caught by checkpatch.pl in kernel/acct.c Manish Katiyar
2009-02-15 18:50 ` Manish Katiyar
2009-02-16 13:19 ` Stefan Richter
2009-02-16 13:19   ` Stefan Richter
2009-02-15 18:39 [PATCH] Remove errors caught by checkpatch.pl in kernel/utsname_sysctl.c Manish Katiyar
2009-02-15 18:51 ` Manish Katiyar
2009-02-16 13:09 ` Stefan Richter
2009-02-16 13:09   ` Stefan Richter
2009-02-16 14:59   ` Manish Katiyar
2009-02-16 15:11     ` [PATCH] Remove errors caught by checkpatch.pl in Manish Katiyar
2009-02-16 15:34     ` [PATCH] Remove errors caught by checkpatch.pl in kernel/utsname_sysctl.c Stefan Richter
2009-02-16 15:34       ` Stefan Richter
2009-02-15 18:34 [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Manish Katiyar
2009-02-15 18:46 ` Manish Katiyar
2009-02-15 18:47 ` Sam Ravnborg
2009-02-15 18:47   ` Sam Ravnborg
2009-02-15 18:47   ` Manish Katiyar
2009-02-15 18:59     ` [PATCH] Remove errors caught by checkpatch.pl in Manish Katiyar
2009-02-16 13:07   ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Stefan Richter
2009-02-16 13:07     ` Stefan Richter
2009-02-16 13:28     ` [PATCH] Remove errors caught by checkpatch.pl in Ingo Molnar
2009-02-16 13:28       ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Ingo Molnar
2009-02-16 14:00       ` Stefan Richter
2009-02-16 14:00         ` Stefan Richter
2009-02-16 14:19         ` [PATCH] Remove errors caught by checkpatch.pl in Ingo Molnar
2009-02-16 14:19           ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Ingo Molnar
2009-02-16 15:22           ` Stefan Richter
2009-02-16 15:22             ` Stefan Richter
2009-02-16 15:41             ` Manish Katiyar
2009-02-16 15:53               ` [PATCH] Remove errors caught by checkpatch.pl in Manish Katiyar
2009-02-16 15:50             ` Ingo Molnar
2009-02-16 15:50               ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Ingo Molnar
2009-02-16 16:13               ` Stefan Richter
2009-02-16 16:13                 ` Stefan Richter
2009-02-16 17:12                 ` [PATCH] Remove errors caught by checkpatch.pl in Ingo Molnar
2009-02-16 17:12                   ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Ingo Molnar
2009-02-16 18:04                   ` Stefan Richter
2009-02-16 18:04                     ` Stefan Richter
2009-02-16 16:13               ` [PATCH] Remove errors caught by checkpatch.pl in Al Viro
2009-02-16 16:13                 ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Al Viro
2009-02-16 17:11                 ` [PATCH] Remove errors caught by checkpatch.pl in Ingo Molnar
2009-02-16 17:11                   ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Ingo Molnar
2009-02-16 14:28       ` [PATCH] Remove errors caught by checkpatch.pl in Paolo Ciarrocchi
2009-02-16 14:28         ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Paolo Ciarrocchi
2009-02-16 16:17       ` Julia Lawall
2009-02-16 16:17         ` Julia Lawall
2009-02-16 16:35         ` Stefan Richter
2009-02-16 16:35           ` Stefan Richter
2009-02-16 17:21           ` [PATCH] Remove errors caught by checkpatch.pl in Ingo Molnar
2009-02-16 17:21             ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Ingo Molnar
2009-02-16 17:15         ` [PATCH] Remove errors caught by checkpatch.pl in Ingo Molnar
2009-02-16 17:15           ` [PATCH] Remove errors caught by checkpatch.pl in kernel/kallsyms.c Ingo Molnar

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.