[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <23e7b9e33738bfa1b1d1ac0ccd4d78235decaa30.camel@perches.com>
Date: Tue, 06 Oct 2020 01:41:56 -0700
From: Joe Perches <joe@...ches.com>
To: Łukasz Stelmach <l.stelmach@...sung.com>,
Andy Whitcroft <apw@...onical.com>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Bartłomiej Żolnierkiewicz
<b.zolnierkie@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH v2] checkpatch: Fix false positive on empty block
comment lines
On Tue, 2020-10-06 at 10:35 +0200, Łukasz Stelmach wrote:
> To avoid false positives in presence of SPDX-License-Identifier in
> networking files it is required to increase the leeway for empty block
> comment lines by one line.
>
> For example, checking drivers/net/loopback.c which starts with
>
> // SPDX-License-Identifier: GPL-2.0-or-later
> /*
> * INET An implementation of the TCP/IP protocol suite for the LINUX
>
> rsults in an unnecessary warning
>
> WARNING: networking block comments don't use an empty /* line, use /* Comment...
> +/*
> + * INET An implementation of the TCP/IP protocol suite for the LINUX
>
> Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
Thank Lukasz. Andrew, can you please pick this up?
> ---
> scripts/checkpatch.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Changes in v2:
> - added example warning in the commit description
> - added a comment in the code
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index a213cdb82ab0..3555ac812c99 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3460,7 +3460,7 @@ sub process {
> if ($realfile =~ m@^(drivers/net/|net/)@ &&
> $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
> $rawline =~ /^\+[ \t]*\*/ &&
> - $realline > 2) {
> + $realline > 3) { # Do not warn about the initial copyright comment block after SPDX-License-Identifier
> WARN("NETWORKING_BLOCK_COMMENT_STYLE",
> "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
> }
Powered by blists - more mailing lists