All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Stefani Seibold <stefani@seibold.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	apw@canonical.com, jschopp@austin.ibm.com, davej@redhat.com
Subject: Re: [PATCH] checkpatch.pl: add union and struct to the exceptions list
Date: Mon, 11 Jan 2010 14:42:04 -0800	[thread overview]
Message-ID: <20100111144204.f52568d6.akpm@linux-foundation.org> (raw)
In-Reply-To: <1262796360.1011.9.camel@wall-e>

On Wed, 06 Jan 2010 17:46:00 +0100
Stefani Seibold <stefani@seibold.net> wrote:

> This patch add the struct and union keywords to the exceptions list of
> the checkpatch.pl script, to prevent error message "Macros with multiple
> statements should be enclosed in a do - while loop". Otherwise it is not
> possible to build a struct or union with a macro. 
> 
> Signed-off-by: Stefani Seibold <stefani@seibold.net>
> ---
>  checkpatch.pl |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-2.6.33-rc2.orig/scripts/checkpatch.pl	2009-12-03 04:51:21.000000000 +0100
> +++ linux-2.6.33-rc2.new/scripts/checkpatch.pl	2010-01-06 17:35:29.747634447 +0100
> @@ -2348,6 +2348,8 @@ sub process {
>  				DECLARE_PER_CPU|
>  				DEFINE_PER_CPU|
>  				__typeof__\(|
> +				union|
> +				struct|
>  				\.$Ident\s*=\s*|
>  				^\"|\"$
>  			}x;

hm.  Perhaps it would help if you could provide a snippet of code which
triggers the incorrect warning?


  reply	other threads:[~2010-01-11 22:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06 16:46 [PATCH] checkpatch.pl: add union and struct to the exceptions list Stefani Seibold
2010-01-11 22:42 ` Andrew Morton [this message]
2010-01-12 21:44   ` Stefani Seibold

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=20100111144204.f52568d6.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=davej@redhat.com \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefani@seibold.net \
    /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.