mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: Junio C Hamano <junio@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Greg Kroah-Hartman <greg@kroah.com>,
	David Newall <davidn@davidnewall.com>,
	Krzysztof Halasa <khc@pm.waw.pl>,
	linux-kernel@vger.kernel.org, general@lists.openfabrics.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Glenn Streiff <gstreiff@NetEffect.com>,
	Roland Dreier <rdreier@cisco.com>,
	Faisal Latif <flatif@NetEffect.com>
Subject: Re: [ofa-general] Re: Merging of completely unreviewed drivers
Date: Fri, 22 Feb 2008 11:02:28 +0200	[thread overview]
Message-ID: <20080222090228.GH28328@cs181133002.pp.htv.fi> (raw)
In-Reply-To: <7vbq69pkqy.fsf@gitster.siamese.dyndns.org>

On Thu, Feb 21, 2008 at 10:29:09PM -0800, Junio C Hamano wrote:
> Linus Torvalds <torvalds@linux-foundation.org> writes:
> 
> > So I'd be happier with warnings about deep indentation (but how do you 
> > count it? Will people then try to fake things out by using 4-space indents 
> > and then "deep" indentations will look like just a couple of tabs?) and 
> > against complex expressions (ie "if ((a = xyz()) == NULL) .." should just 
> > be split up into "a = xyz(); if (!a) ..", but there are sometimes reasons 
> > for those things too!
> 
> Deep indentation should be fairly easy, given that you
> already have rules in place that says "Tabs are 8 characters".
> So if you find a line that begins with more than say 4 SP, you
> can flag that as already bogus (i.e. "does not indent with HT"),
> more than 8 SP definitely so.
>...

Checkpatch already has an error "use tabs not spaces".

And people should realize that checkpatch is not a tool for janitors but 
for authors and maintainers to easily spot some of the possible problems 
in a driver and thereby automate some part of patch review.

E.g. in this driver we are talking about checkpatch warns about the
> 2000 lines over 80 characters.

And that's not a surprise and a symptom when code is 6 tabs indented.

If someone said fixing that should not delay the merge of a 16.500 lines
driver I would agree with that since fixing that would require a huge 
amount of work for a not that big gain.

But that a merged driver contains > 250 checkpatch errors is really not 
nice. Most of them are easy to fix stylistic errors that simply make the 
driver easier to read and whose fixing would only take a few hours 
altogether. [1]

And the 13 checkpatch errors about volatile usage are not stuff for 
janitors (unless you count our number one cleanup person Al as janitor) 
but indicate really fishy code.

cu
Adrian

[1] one might argue whether "easier to read" really applies when 
    checkpatch gives errors for e.g. the usage of C99 comments, but
    different from overly long lines that's at least stuff that can
    be fixed very quickly and in a quite automatic way

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2008-02-22  9:03 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 22:59 [2.6 patch] infiniband/hw/nes/nes_verbs.c: fix off-by-one Adrian Bunk
2008-02-20  4:23 ` [ofa-general] " Roland Dreier
2008-02-20  5:57   ` Adrian Bunk
2008-02-20 23:21     ` Roland Dreier
2008-02-20 23:27       ` Glenn Streiff
2008-02-21 12:39         ` Glenn Streiff
2008-02-21 15:49           ` Adrian Bunk
2008-02-21 20:28             ` Roland Dreier
2008-02-21 21:01               ` Merging of completely unreviewed drivers Adrian Bunk
2008-02-21 21:09                 ` Roland Dreier
2008-02-21 21:14                 ` Linus Torvalds
2008-02-21 22:33                   ` Alexey Dobriyan
2008-02-21 22:43                     ` Greg KH
2008-02-21 22:57                       ` Jeff Garzik
2008-02-21 22:58                       ` Alexey Dobriyan
2008-02-21 23:31                       ` Jan Engelhardt
2008-02-21 23:38                   ` Krzysztof Halasa
2008-02-21 23:31                     ` Alan Cox
2008-02-22  0:29                       ` Adrian Bunk
2008-02-21 23:41                     ` Jeff Garzik
2008-02-22  0:05                       ` Krzysztof Halasa
2008-02-22  0:44                         ` Jeff Garzik
2008-02-22  2:02                           ` Krzysztof Halasa
2008-02-22 10:04                         ` Alan Cox
2008-02-22 18:45                         ` Pavel Machek
2008-02-22 22:44                           ` Krzysztof Halasa
2008-02-23  9:43                             ` Pavel Machek
2008-02-23 12:38                               ` David Newall
2008-02-23 15:25                                 ` Pavel Machek
2008-02-24  3:18                                   ` David Newall
2008-02-23 17:33                                 ` Linus Torvalds
2008-02-24  3:26                                   ` David Newall
2008-02-24  4:47                                     ` Linus Torvalds
2008-02-23 13:58                               ` Krzysztof Halasa
2008-02-22  1:46                     ` David Newall
2008-02-22  2:06                       ` Al Viro
2008-02-22  2:23                         ` Krzysztof Halasa
2008-02-22  3:13                           ` Al Viro
2008-02-22 22:28                             ` Krzysztof Halasa
2008-02-24  7:47                               ` Jörn Engel
2008-02-24 14:47                                 ` Krzysztof Halasa
2008-02-22  3:13                         ` Linus Torvalds
2008-02-22  6:29                           ` [ofa-general] " Junio C Hamano
2008-02-22  9:02                             ` Adrian Bunk [this message]
2008-02-22  6:37                           ` Ray Lee
2008-02-23 15:31                             ` Jan Engelhardt
2008-02-24  3:22                               ` David Newall
2008-02-22 22:37                           ` Krzysztof Halasa
2008-02-22 12:29                       ` [ofa-general] " Bart Van Assche
2008-02-22 14:25                         ` David Newall
2008-02-22 15:17                           ` Peter Zijlstra
2008-02-22 16:48                             ` John W. Linville
2008-02-22 22:59                             ` Krzysztof Halasa
2008-02-22 23:14                               ` Al Viro
2008-02-22 15:48                           ` John W. Linville
2008-02-22 18:54                   ` Ingo Molnar
2008-02-22 19:11                     ` [ofa-general] " Bart Van Assche
2008-02-22 19:20                     ` Jeff Garzik
2008-02-22 19:44                       ` Greg KH
2008-02-21 21:30                 ` Greg KH
2008-02-22  1:06                   ` Adrian Bunk
2008-02-21 22:08                 ` Arjan van de Ven
2008-02-21 22:33                   ` Jeff Garzik
2008-02-21 23:40                     ` Adrian Bunk
2008-02-22 18:40                   ` Pavel Machek

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=20080222090228.GH28328@cs181133002.pp.htv.fi \
    --to=bunk@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=davidn@davidnewall.com \
    --cc=flatif@NetEffect.com \
    --cc=general@lists.openfabrics.org \
    --cc=greg@kroah.com \
    --cc=gstreiff@NetEffect.com \
    --cc=junio@pobox.com \
    --cc=khc@pm.waw.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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

all inboxes | Powered by JetHome®