lkml.org 
[lkml]   [2012]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: checkpatch regression: error on #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
From
On Wed, Jan 11, 2012 at 9:12 PM, Joe Perches <joe@perches.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@canonical.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-01-20 12:57    [W:0.050 / U:5.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site