From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
To: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Joe Perches <joe@perches.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andy Whitcroft <apw@canonical.com>
Subject: Re: [PATCH] checkpatch: remove obsolete check for __dev* section markers
Date: Sat, 17 Jul 2021 18:32:05 +0200 [thread overview]
Message-ID: <CAKXUXMyvOh0GvpEf4uX5iFJYOJLo43tmO16Uf34j4i6XD0vBcg@mail.gmail.com> (raw)
In-Reply-To: <20210716182126.4392-1-dwaipayanray1@gmail.com>
On Fri, Jul 16, 2021 at 8:21 PM Dwaipayan Ray <dwaipayanray1@gmail.com> wrote:
>
> Commit 54b956b90360 ("Remove __dev* markings from init.h")
> completely removed the definitions of __dev* section
> markers from init.h. They can no longer pop up in the kernel
> and hence the check for those markers is unneeded now.
>
Generally, a good idea! I like this commit of removing obsolete checks
in checkpatch. Can you identify more checks in checkpatch that are
potentially obsolete and share them with us?
I assume:
If you run checkpatch on the whole latest kernel tree and you run
checkpatch on the last 50,000 commits or so, all checks that were
never triggered on those evaluations are potentially obsolete. I
assume that only a handful of checks would qualify for that criteria,
and then we could dig deeper into the history of those checks and see
if they still serve a potential purpose or can be removed.
If you need a powerful server to run such checkpatch evaluations, just
let me know.
Just on the wording of your commit message:
The first sentence reads very strange, because you are just repeating
the commit message. So, you can probably just combine the first two
sentences and make it much shorter:
Since commit ..., the check in checkpatch for __dev* markings is obsolete.
Remove this obsolete check.
Lukas
> So remove __dev* section markers check from checkpatch.
>
> Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>
> ---
> scripts/checkpatch.pl | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 461d4221e4a4..e29c0961b25e 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -4023,12 +4023,6 @@ sub process {
> "CVS style keyword markers, these will _not_ be updated\n". $herecurr);
> }
>
> -# check for old HOTPLUG __dev<foo> section markings
> - if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
> - WARN("HOTPLUG_SECTION",
> - "Using $1 is unnecessary\n" . $herecurr);
> - }
> -
> # Check for potential 'bare' types
> my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
> $realline_next);
> --
> 2.28.0
>
next prev parent reply other threads:[~2021-07-17 16:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-16 18:21 [PATCH] checkpatch: remove obsolete check for __dev* section markers Dwaipayan Ray
2021-07-17 16:32 ` Lukas Bulwahn [this message]
2021-07-17 16:57 ` Dwaipayan Ray
2021-07-18 2:44 ` Joe Perches
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=CAKXUXMyvOh0GvpEf4uX5iFJYOJLo43tmO16Uf34j4i6XD0vBcg@mail.gmail.com \
--to=lukas.bulwahn@gmail.com \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).