public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbou@mail.ru>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
	mb@bu3sch.de, linville@tuxdriver.com, maxextreme@gmail.com,
	gregkh@suse.de, jschopp@austin.ibm.com
Subject: Re: [PATCH 0/9] Kconfig: cleanup s390 v2.
Date: Thu, 26 Apr 2007 05:39:16 +0400	[thread overview]
Message-ID: <20070426013916.GA8219@zarina> (raw)
In-Reply-To: <200704260232.06909.arnd@arndb.de>

On Thu, Apr 26, 2007 at 02:32:06AM +0200, Arnd Bergmann wrote:
> On Thursday 26 April 2007, Andrew Morton wrote:
> > It would be neat if someone could create and maintain a new
> > scripts/spot-common-mistakes.  Feed it a unified diff and it would complain
> > about newly-added code (and only newly-added code) which has busted
> > whitespace, adds new semaphores, adds new kernel_thread calls, etc, etc.
> 
> http://patchstylecheck.googlecode.com/svn/trunk/patchstylecheckemail.pl
> Might serve as a starting point for this. It doesn't have any semantic
> checks right now, but I guess they can be added.

Had run this utility against my battery patches, and caught
bunch of false positives (I believe).


+#define BATTERY_PROP(bat, prop) ({                                 \
+	void *value = bat->get_property(bat, BATTERY_PROP_##prop); \
+	value ? *(int*)value : 0;                                  \
+})

Got: "Macros with multiple statements should be enclosed in a do - while
loop"

I believed ({}) is equivalent for "do - while", it's widely used in
kernel.


+	switch (bp) {
+	default: break;
+	};

Got "Gotos should not be indented", at "default: break;"


+static int bind_pst_to_psy(struct power_supplicant *pst,
+                           struct power_supply *psy)
+{

Got "use tabs not spaces". Here spaces intentionally used for
formatting purpose, not for the indenting.

  parent reply	other threads:[~2007-04-26  1:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-23 14:11 [PATCH 0/9] Kconfig: cleanup s390 v2 Martin Schwidefsky
2007-04-23 16:52 ` Arnd Bergmann
2007-04-23 17:45 ` Andrew Morton
2007-04-24  7:52   ` Martin Schwidefsky
2007-04-25 18:21   ` Randy Dunlap
2007-04-25 21:30     ` Andrew Morton
2007-04-26  0:24       ` Andrew Morton
2007-04-26  0:32         ` Arnd Bergmann
2007-04-26  1:06           ` Andrew Morton
2007-04-26  1:39           ` Anton Vorontsov [this message]
2007-04-26  8:30           ` Andrew Morton
2007-04-26 20:36             ` Randy Dunlap
2007-04-26  0:39         ` Dave Jones
2007-04-26  2:38           ` Randy Dunlap
2007-04-26  3:02             ` Andrew Morton
2007-04-26  4:24               ` Dave Jones
2007-04-26 13:02       ` Andy Whitcroft
2007-05-09 11:21   ` Martin Schwidefsky
2007-05-09 16:35     ` Andrew Morton
2007-05-10  7:25       ` Martin Schwidefsky

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=20070426013916.GA8219@zarina \
    --to=cbou@mail.ru \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@suse.de \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=maxextreme@gmail.com \
    --cc=mb@bu3sch.de \
    --cc=randy.dunlap@oracle.com \
    --cc=schwidefsky@de.ibm.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