diff mbox series

[v2] net: drop special comment style

Message ID 20240819110950.9602c7ae8daa.Ic187fbc5ba452463ef28feebbd5c18668adb0fec@changeid (mailing list archive)
State Accepted
Commit 82b8000c28b56b014ce52a1f1581bef4af148681
Headers show
Series [v2] net: drop special comment style | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Johannes Berg Aug. 19, 2024, 9:09 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

As we discussed in the room at netdevconf earlier this week,
drop the requirement for special comment style for netdev.

For checkpatch, the general check accepts both right now, so
simply drop the special request there as well.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
v2:
 - drop paragraph from Documentation/process/coding-style.rst
   (Alexandra Winter)
 - collect Stephen's acked-by
---
 Documentation/process/coding-style.rst      | 12 ------------
 Documentation/process/maintainer-netdev.rst | 17 -----------------
 scripts/checkpatch.pl                       | 10 ----------
 3 files changed, 39 deletions(-)

Comments

Jakub Kicinski Aug. 22, 2024, 2:44 p.m. UTC | #1
On Mon, 19 Aug 2024 11:09:43 +0200 Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> As we discussed in the room at netdevconf earlier this week,
> drop the requirement for special comment style for netdev.
> 
> For checkpatch, the general check accepts both right now, so
> simply drop the special request there as well.
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

I, myself, don't care, which aligns with the new logic of accepting
both:

Acked-by: Jakub Kicinski <kuba@kernel.org>
patchwork-bot+netdevbpf@kernel.org Aug. 23, 2024, 9:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Mon, 19 Aug 2024 11:09:43 +0200 you wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> As we discussed in the room at netdevconf earlier this week,
> drop the requirement for special comment style for netdev.
> 
> For checkpatch, the general check accepts both right now, so
> simply drop the special request there as well.
> 
> [...]

Here is the summary with links:
  - [v2] net: drop special comment style
    https://git.kernel.org/netdev/net/c/82b8000c28b5

You are awesome, thank you!
diff mbox series

Patch

diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
index 04f6aa377a5d..8e30c8f7697d 100644
--- a/Documentation/process/coding-style.rst
+++ b/Documentation/process/coding-style.rst
@@ -629,18 +629,6 @@  The preferred style for long (multi-line) comments is:
 	 * with beginning and ending almost-blank lines.
 	 */
 
-For files in net/ and drivers/net/ the preferred style for long (multi-line)
-comments is a little different.
-
-.. code-block:: c
-
-	/* The preferred comment style for files in net/ and drivers/net
-	 * looks like this.
-	 *
-	 * It is nearly the same as the generally preferred comment style,
-	 * but there is no initial almost-blank line.
-	 */
-
 It's also important to comment data, whether they are basic types or derived
 types.  To this end, use just one data declaration per line (no commas for
 multiple data declarations).  This leaves you room for a small comment on each
diff --git a/Documentation/process/maintainer-netdev.rst b/Documentation/process/maintainer-netdev.rst
index fe8616397d63..30d24eecdaaa 100644
--- a/Documentation/process/maintainer-netdev.rst
+++ b/Documentation/process/maintainer-netdev.rst
@@ -355,23 +355,6 @@  just do it. As a result, a sequence of smaller series gets merged quicker and
 with better review coverage. Re-posting large series also increases the mailing
 list traffic.
 
-Multi-line comments
-~~~~~~~~~~~~~~~~~~~
-
-Comment style convention is slightly different for networking and most of
-the tree.  Instead of this::
-
-  /*
-   * foobar blah blah blah
-   * another line of text
-   */
-
-it is requested that you make it look like this::
-
-  /* foobar blah blah blah
-   * another line of text
-   */
-
 Local variable ordering ("reverse xmas tree", "RCS")
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 39032224d504..4427572b2477 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4015,16 +4015,6 @@  sub process {
 			}
 		}
 
-# Block comment styles
-# Networking with an initial /*
-		if ($realfile =~ m@^(drivers/net/|net/)@ &&
-		    $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
-		    $rawline =~ /^\+[ \t]*\*/ &&
-		    $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);
-		}
-
 # Block comments use * on subsequent lines
 		if ($prevline =~ /$;[ \t]*$/ &&			#ends in comment
 		    $prevrawline =~ /^\+.*?\/\*/ &&		#starting /*