Re: checkpatch problem

From: David Howells
Date: Thu Sep 23 2010 - 14:54:40 EST


Joe Perches <joe@xxxxxxxxxxx> wrote:

> Exactly right. Andy has a version in his testing directory
> that fixes this #define run-on block and speeds up checkpatch
> runtime rather a lot for certain files like .h files that have
> nothing but #defines.
>
> Try applying my patch to this newer version:
>
> http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing

It still doesn't work. In fact, I'm seeing more "Logging function has
unnecessary whitespace before a newline" warnings, such as on this:

printk(KERN_ERR
"BUG: CPU#%d started up but did not get a callout!\n",
cpu);

where I wasn't before.

I am still getting them on #defines:

-:6841: WARNING: Logging function has unnecessary whitespace before a newline
#6841: FILE: arch/mn10300/kernel/smp.c:57:
+#define Dprintk(fmt, ...) printk(KERN_DEBUG fmt, ##__VA_ARGS__)


Also, --emacs mode appears to be broken. It sticks something like "#7768: "
on the front of the filename encoded in the patch:

-:7768: WARNING: Logging function has unnecessary whitespace before a newline
#7768: FILE: arch/mn10300/kernel/smp.c:984:
+ printk(KERN_ERR

which emacs interprets as a filename. Without that, emacs happily strips off
the 'FILE: ' prefix and uses the filename and line number. I don't
particularly care about the line number in the patch: I'm not editing the
patch - I'm editing the file contributing to the patch.

David
--
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/