Re: [PATCH] reformat_with_checkpatch: Add automation to checkpatch
On Fri, Jul 11, 2014 at 06:46:52PM -0700, Joe Perches wrote:
On Fri, 2014-07-11 at 18:39 -0700, Greg KH wrote:
On Fri, Jul 11, 2014 at 06:21:27PM -0700, Joe Perches wrote:
A simple script to run checkpatch --fix for various types of of cleanups. ] drivers/staging/lustre/include/linux/lnet/api.h has no obvious style problems and is ready for submission. file: <drivers/staging/lustre/include/linux/lnet/api.h> description: <update c90 comment style> types:<c99_comments> Useless use of greediness modifier '+' in regex; marked by <-- HERE in m/(^\+.*) {8,8}+ <-- HERE \t/ at ./scripts/checkpatch.pl line 2217. [] drivers/staging/lustre/include/linux/lnet/api.h has no obvious style problems and is ready for submission. [] Is that expected?
No, I haven't seen that.
Can you tell me what git tree you're working on?
My staging-next branch of staging.git on git.kernel.org
Also, can you use the scripts/checkpatch from -next tag next-20140711
that will take a bit to checkout, I'll do that afterward.
My system has:
$ perl --version
This is perl 5, version 18, subversion 2 (v5.18.2) built for i686-linux-gnu-thread-multi-64int (with 41 registered patches, see perl -V for more detail)
I think this started showing up for me for perl 5.20. Let me go checkout linux-next and see if that fixes anything or not... thanks, greg k-h
On Fri, Jul 11, 2014 at 07:01:14PM -0700, Greg KH wrote:
On Fri, Jul 11, 2014 at 06:46:52PM -0700, Joe Perches wrote:
On Fri, 2014-07-11 at 18:39 -0700, Greg KH wrote:
On Fri, Jul 11, 2014 at 06:21:27PM -0700, Joe Perches wrote:
A simple script to run checkpatch --fix for various types of of cleanups. ] drivers/staging/lustre/include/linux/lnet/api.h has no obvious style problems and is ready for submission. file: <drivers/staging/lustre/include/linux/lnet/api.h> description: <update c90 comment style> types:<c99_comments> Useless use of greediness modifier '+' in regex; marked by <-- HERE in m/(^\+.*) {8,8}+ <-- HERE \t/ at ./scripts/checkpatch.pl line 2217. [] drivers/staging/lustre/include/linux/lnet/api.h has no obvious style problems and is ready for submission. [] Is that expected?
No, I haven't seen that.
Can you tell me what git tree you're working on?
My staging-next branch of staging.git on git.kernel.org
Also, can you use the scripts/checkpatch from -next tag next-20140711
that will take a bit to checkout, I'll do that afterward.
My system has:
$ perl --version
This is perl 5, version 18, subversion 2 (v5.18.2) built for i686-linux-gnu-thread-multi-64int (with 41 registered patches, see perl -V for more detail)
I think this started showing up for me for perl 5.20. Let me go checkout linux-next and see if that fixes anything or not...
Ok, with linux-next I get the same thing: ~/linux/tmp/linux-next $ ./scripts/checkpatch.pl -f --strict drivers/staging/lustre/include/linux/lnet/api.h --types=c99_comments Useless use of greediness modifier '+' in regex; marked by <-- HERE in m/(^\+.*) {8,8}+ <-- HERE \t/ at ./scripts/checkpatch.pl line 2358. total: 0 errors, 0 warnings, 0 checks, 220 lines checked NOTE: Used message types: C99_COMMENTS drivers/staging/lustre/include/linux/lnet/api.h has no obvious style problems and is ready for submission.
There's a useless "+" use that needs to be removed as perl 5.20 emits a "Useless use of greediness modifier '+'" message each time it's hit. Reported-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Joe Perches <joe@perches.com> --- On Fri, 2014-07-11 at 19:05 -0700, Greg KH wrote:
Ok, with linux-next I get the same thing:
Thanks Greg. scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d5ac001..370a974 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2376,7 +2376,7 @@ sub process { "please, no space before tabs\n" . $herevet) && $fix) { while ($fixed[$fixlinenr] =~ - s/(^\+.*) {8,8}+\t/$1\t\t/) {} + s/(^\+.*) {8,8}\t/$1\t\t/) {} while ($fixed[$fixlinenr] =~ s/(^\+.*) +\t/$1\t/) {} }
Hi Joe, On Fri, 2014-07-11 at 07:09PM -0700, Joe Perches wrote:
There's a useless "+" use that needs to be removed as perl 5.20 emits a "Useless use of greediness modifier '+'" message each time it's hit.
I saw this Perl warning today as well and wondered whether this patch is coming or not. Apparently it's not in linux-next (yet). Thanks, Sören
There's a useless "+" use that needs to be removed as perl 5.20 emits a "Useless use of greediness modifier '+'" message each time it's hit. Reported-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Joe Perches <joe@perches.com> --- Resending, maybe Andrew's all-seeing eye blinked... On Fri, 2014-07-11 at 19:05 -0700, Greg KH wrote:
Ok, with linux-next I get the same thing:
Thanks Greg. scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d5ac001..370a974 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2376,7 +2376,7 @@ sub process { "please, no space before tabs\n" . $herevet) && $fix) { while ($fixed[$fixlinenr] =~ - s/(^\+.*) {8,8}+\t/$1\t\t/) {} + s/(^\+.*) {8,8}\t/$1\t\t/) {} while ($fixed[$fixlinenr] =~ s/(^\+.*) +\t/$1\t/) {} }
Hey Andrew, can we get this one applied already - I'm seeing this warning at least since before my summer vacation started! :-P Thanks. On Mon, Sep 01, 2014 at 09:55:06AM -0700, Joe Perches wrote:
There's a useless "+" use that needs to be removed as perl 5.20 emits a "Useless use of greediness modifier '+'" message each time it's hit.
Reported-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Joe Perches <joe@perches.com> ---
Resending, maybe Andrew's all-seeing eye blinked...
On Fri, 2014-07-11 at 19:05 -0700, Greg KH wrote:
Ok, with linux-next I get the same thing:
Thanks Greg.
scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d5ac001..370a974 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2376,7 +2376,7 @@ sub process { "please, no space before tabs\n" . $herevet) && $fix) { while ($fixed[$fixlinenr] =~ - s/(^\+.*) {8,8}+\t/$1\t\t/) {} + s/(^\+.*) {8,8}\t/$1\t\t/) {} while ($fixed[$fixlinenr] =~ s/(^\+.*) +\t/$1\t/) {} }
-- 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/
-- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. --
On Thu, Oct 30, 2014 at 12:12:04PM +0100, Borislav Petkov wrote:
Hey Andrew,
can we get this one applied already - I'm seeing this warning at least since before my summer vacation started! :-P
Oh ok, so it did go in after 3.17 but when using checkpatch on a 3.17 tree, it fires of course. Maybe the first checkpatch fix to tag for stable? :-) -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. --
participants (4)
-
Borislav Petkov -
Greg KH -
Joe Perches -
Sören Brinkmann