From: Joe Perches <joe@perches.com>
To: "Łukasz Stelmach" <l.stelmach@samsung.com>,
"Andy Whitcroft" <apw@canonical.com>,
linux-kernel@vger.kernel.org,
"Andrew Morton" <akpm@linux-foundation.org>
Cc: "Bartłomiej Żolnierkiewicz" <b.zolnierkie@samsung.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>
Subject: Re: [PATCH v2] checkpatch: Fix false positive on empty block comment lines
Date: Tue, 06 Oct 2020 01:41:56 -0700 [thread overview]
Message-ID: <23e7b9e33738bfa1b1d1ac0ccd4d78235decaa30.camel@perches.com> (raw)
In-Reply-To: <20201006083509.19934-1-l.stelmach@samsung.com>
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@samsung.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);
> }
prev parent reply other threads:[~2020-10-06 8:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20201006083511eucas1p213c64f56efcc905970fa2b26a05c55bf@eucas1p2.samsung.com>
2020-10-06 8:35 ` Łukasz Stelmach
2020-10-06 8:41 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23e7b9e33738bfa1b1d1ac0ccd4d78235decaa30.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=b.zolnierkie@samsung.com \
--cc=l.stelmach@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®