public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [x86] is checkpatch.pl broken
Date: Tue, 25 Dec 2007 15:47:53 -0800	[thread overview]
Message-ID: <477196A9.3040205@zytor.com> (raw)
In-Reply-To: <20071225170737.GA3887@cvg.org>

Cyrill Gorcunov wrote:
> Hi list,
> 
> by doing cleanup of arch/x86/boot/*.[ch] i found that
> checkpatch does ignore obvious things. For example,
> run it over edd.c showed only one warning:

I'm generally skeptical to the kind of "cleanups" that you seem to be 
referring to.  More often then not they reduce legibility instead of the 
opposite.

> ---
> cyrill@cvg linux-2.6.git $ scripts/checkpatch.pl --file arch/x86/boot/edd.c 
> WARNING: externs should be avoided in .c files
> #45: FILE: x86/boot/edd.c:45:
> +       extern char _end[];
> 
> total: 0 errors, 1 warnings, 167 lines checked
> 
> Your patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> ---
> 
> but on line 53 we have:
> 
> mbr_base = (buf_base+sector_size-1) & ~(sector_size-1);
> 
> so checkpatch should at least worn me about missed space
> btw math operators. Am I wrong?

If checkpatch considered that line to be a problem, I would consider 
checkpatch to be utterly broken.  That line is perfectly legible, and 
padding in a bunch of spaces would make it LESS so, especially since it 
would have to be split between lines.

	-hpa

  reply	other threads:[~2007-12-25 23:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-25 17:07 [x86] is checkpatch.pl broken Cyrill Gorcunov
2007-12-25 23:47 ` H. Peter Anvin [this message]
2007-12-25 23:48 ` H. Peter Anvin
2007-12-26 10:38   ` Cyrill Gorcunov
2007-12-26 17:44     ` H. Peter Anvin
2007-12-26 18:15       ` Cyrill Gorcunov
2007-12-30 17:22     ` Ingo Molnar
2007-12-30 18:26       ` Cyrill Gorcunov
2007-12-30 20:27         ` H. Peter Anvin
2007-12-31  7:46           ` Cyrill Gorcunov
2007-12-30 20:59       ` Cyrill Gorcunov
2007-12-30 21:08         ` 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=477196A9.3040205@zytor.com \
    --to=hpa@zytor.com \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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