linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj38.park@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	"SeongJae Park" <sjpark@amazon.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, apw@canonical.com,
	colin.king@canonical.com, sj38.park@gmail.com, jslaby@suse.cz,
	pavel@ucw.cz, "SeongJae Park" <sjpark@amazon.de>
Subject: Re: Re: checkpatch: support deprecated terms checking
Date: Sun, 26 Jul 2020 01:35:57 +0200	[thread overview]
Message-ID: <20200725233557.8154-1-sj38.park@gmail.com> (raw)
In-Reply-To: <58ed7006138bb256ad1821d5f4f892f3c3e031a8.camel@perches.com>

On Sat, 25 Jul 2020 10:29:23 -0700 Joe Perches <joe@perches.com> wrote:

> On Sat, 2020-07-25 at 15:02 +0200, Michał Mirosław wrote:
> > Hello,
> > 
> > I see that this patch went into next and is already inciting people to
> > do wrong things [1]. Can you please fix it to require '--subjective'
> > switch or otherwise mark it clearly as suggestion-only?
> > 
> > The coding-style as in Linus' master says about *NEW* uses of the words
> > listed (those introductions I expect to be actually rare) and not about
> > existing use in the code or industry. Making a noise about all uses
> > found surely will generate a lot more irrelevant patches.
> > 
> > [1] https://www.spinics.net/lists/linux-tegra/msg51849.html
> 
> And if not reverted, perhaps do not check existing files
> at all but only check patches and change the message to
> show only suggestions not from a specification.

Agreed for this case.  However, excluding existing file check doesn't fully
avoid this problem.  Also, more terms having different deprecation rules might
be added in future.  How about allowing file check but show reference in the
suggestion message as below?

> ---
[...]


Thanks,
SeongJae Park


================================ >8 ===========================================
From aeb852296bc40ca1de8a6a11f4d5368b02d2e417 Mon Sep 17 00:00:00 2001
From: SeongJae Park <sjpark@amazon.de>
Date: Sun, 26 Jul 2020 01:14:48 +0200
Subject: [PATCH] scripts/deprecatd_terms: provide references

Deprecation of terms could have special rules.  For example, 'slave' is
ok for existing usages.  Same to 'master', but it's also ok unless it's
used with 'slave'.  This commit provides the references for such rules.

Signed-off-by: SeongJae Park <sjpark@amazon.de>
---
 scripts/checkpatch.pl        | 2 +-
 scripts/deprecated_terms.txt | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e9fde28eb0de..77f5f777b053 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2981,7 +2981,7 @@ sub process {
 				my $msg_level = \&WARN;
 				$msg_level = \&CHK if ($file);
 				if (&{$msg_level}("DEPRECATED_TERM",
-						  "Use of '$deprecated_term' is deprecated, please '$suggested', instead.\n" . $herecurr) &&
+						  "Use of '$deprecated_term' is controversial - if not required by specification, perhaps '$suggested' instead.  See: scripts/deprecated_terms.txt\n" . $herecurr) &&
 				    $fix) {
 					$fixed[$fixlinenr] =~ s/(^|[^A-Za-z@])($deprecated_term)($|[^A-Za-z@])/$1$suggested$3/;
 				}
diff --git a/scripts/deprecated_terms.txt b/scripts/deprecated_terms.txt
index 1be27a24187b..d92b9c896fce 100644
--- a/scripts/deprecated_terms.txt
+++ b/scripts/deprecated_terms.txt
@@ -3,8 +3,10 @@
 # The format of each line is:
 # deprecated||suggested
 #
+# If special rules are applied on the terms, please comment those.
+#
+# Refer to "4) Naming" section of Documentation/process/coding-style.rst for
+# below three terms.
 blacklist||(denylist|blocklist)
-# For other alternatives of 'slave', Please refer to
-# Documentation/process/coding-style.rst
 slave||(secondary|target|...)
 whitelist||(allowlist|passlist)
-- 
2.17.1


  reply	other threads:[~2020-07-25 23:48 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  6:25 [PATCH v4 0/2] Recommend denylist/allowlist instead of blacklist/whitelist SeongJae Park
2020-06-11  6:25 ` [PATCH v4 1/2] checkpatch: support deprecated terms checking SeongJae Park
2020-07-25 13:02   ` Michał Mirosław
2020-07-25 16:36     ` Joe Perches
2020-07-25 17:29     ` Joe Perches
2020-07-25 23:35       ` SeongJae Park [this message]
2020-07-26  4:27         ` Joe Perches
2020-07-26  7:18           ` SeongJae Park
2020-07-26  7:29             ` Joe Perches
2020-07-26  7:45               ` SeongJae Park
2020-07-26 14:50                 ` Joe Perches
2020-07-26 15:36                   ` SeongJae Park
2020-07-26 16:42                     ` Joe Perches
2020-07-26 18:07                       ` SeongJae Park
2020-07-26 20:33                         ` Michał Mirosław
2020-07-27  6:54                           ` SeongJae Park
2020-07-27 20:44                             ` Andrew Morton
2020-07-27 20:49                               ` Joe Perches
2020-07-28  6:22                                 ` SeongJae Park
2020-06-11  6:25 ` [PATCH v4 2/2] scripts/deprecated_terms: Recommend denylist/allowlist instead of blacklist/whitelist SeongJae Park
2020-06-11  6:35 ` [PATCH v4 0/2] " Joe Perches
2020-06-11  7:38   ` SeongJae Park
2020-06-11  8:16     ` Jiri Slaby
2020-06-11  8:30       ` SeongJae Park
2020-06-11  8:32         ` Jiri Slaby
2020-06-11 10:43           ` Joe Perches
2020-06-12  6:40             ` SeongJae Park
2020-06-12  7:05               ` Joe Perches
2020-06-12 14:40       ` Michael Ellerman
2020-06-14 21:29         ` Pavel Machek
2020-06-15  4:21           ` Jiri Slaby
2020-06-15  6:12             ` Pavel Machek
2020-06-15  6:46               ` SeongJae Park
2020-06-15  7:00                 ` Joe Perches
2020-06-15  7:39                   ` Pavel Machek

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=20200725233557.8154-1-sj38.park@gmail.com \
    --to=sj38.park@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=colin.king@canonical.com \
    --cc=joe@perches.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=pavel@ucw.cz \
    --cc=sjpark@amazon.com \
    --cc=sjpark@amazon.de \
    /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).