[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAq6er0eXaG7pShVAtbSycs0NiqUbmj99P-Re_N3vWRvym=+5g@mail.gmail.com>
Date: Fri, 20 Jan 2012 11:53:52 +0000
From: Andy Whitcroft <apw@...onical.com>
To: Joe Perches <joe@...ches.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: checkpatch regression: error on #define pr_fmt(fmt)
KBUILD_MODNAME ": " fmt
On Wed, Jan 11, 2012 at 9:12 PM, Joe Perches <joe@...ches.com> wrote:
> Current checkpatch gives:
>
> ERROR: Macros with complex values should be enclosed in parenthesis
> #18: FILE: net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:18:
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> due to:
>
> commit b3dfb9bc52e9a751e47bbc92d3a3f07e9a0029c5
> Author: Andy Whitcroft <apw@...onical.com>
> Date: Thu Dec 22 16:04:25 2011 +1100
>
> checkpatch: correctly track the end of preprocessor commands in context
That one is hard to detect as being a 'string' and therefore ok.
Ok, looks like we can detect the string concatenation occuring here
and handle this better. Does the below version work better for you:
http://people.canonical.com/~apw/checkpatch/checkpatch-next.pl
-apw
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists