Re: checkpatch regression: error on #define pr_fmt(fmt)KBUILD_MODNAME ": " fmt

From: Joe Perches
Date: Fri Jan 20 2012 - 08:00:17 EST


On Fri, 2012-01-20 at 11:53 +0000, Andy Whitcroft wrote:
> On Wed, Jan 11, 2012 at 9:12 PM, Joe Perches <joe@xxxxxxxxxxx> 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
[]
> Does the below version work better for you:
> http://people.canonical.com/~apw/checkpatch/checkpatch-next.pl

Diff is basically:

+ # Flatten any obvious string concatentation.
+ while ($dstat =~ s/("X*")\s*$Ident/$1/ ||
+ $dstat =~ s/$Ident\s*("X*")/$1/)
+ {
+ }

Yes, that works and is appropriate.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/