Skip to contentSkip to conversation

net: make config lines follow common pattern

PATCH In review Lukas Bulwahn 2 participants 2 messages Nov 23, 2023 – Nov 27, 2023

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: make config lines follow common pattern

The Kconfig parser is quite relaxed when parsing config definition lines. However, there are just a few config definition lines that do not follow the common regular expression 'config [0-9A-Z]', i.e., there are only a few cases where config is not followed by exactly one whitespace.

To simplify life for kernel developers that use basic regular expressions to find and extract kernel configs, make all config lines follow this common pattern.

No functional change, just helpful stylistic clean-up.

---
 drivers/net/ethernet/cavium/Kconfig |  4 +--
 net/caif/Kconfig                    |  2 +-
 net/netfilter/ipvs/Kconfig          | 54 ++++++++++++++---------------
 net/unix/Kconfig                    |  2 +-
 4 files changed, 31 insertions(+), 31 deletions(-)
drivers/net/ethernet/cavium/Kconfig +2 -2
index ca742cc146d7..fe4203b1bc5f 100644
@@ -32,7 +32,7 @@ config THUNDER_NIC_VF
 	help
 	  This driver supports Thunder's NIC virtual function
 
-config	THUNDER_NIC_BGX
+config THUNDER_NIC_BGX
 	tristate "Thunder MAC interface driver (BGX)"
 	depends on 64BIT && PCI
 	select PHYLIB
@@ -42,7 +42,7 @@ config	THUNDER_NIC_BGX
 	  This driver supports programming and controlling of MAC
 	  interface from NIC physical function driver.
 
-config	THUNDER_NIC_RGX
+config THUNDER_NIC_RGX
 	tristate "Thunder MAC interface driver (RGX)"
 	depends on 64BIT && PCI
 	select PHYLIB
net/caif/Kconfig +1 -1
index 87205251cc25..1eb271125eb0 100644
@@ -22,7 +22,7 @@ menuconfig CAIF
 	See Documentation/networking/caif for a further explanation on how to
 	use and configure CAIF.
 
-config  CAIF_DEBUG
+config CAIF_DEBUG
 	bool "Enable Debug"
 	depends on CAIF
 	default n
net/netfilter/ipvs/Kconfig +27 -27

202 lines not on this page · raw message

net/unix/Kconfig +1 -1
index 28b232f281ab..5f2502977042 100644
@@ -21,7 +21,7 @@ config UNIX_SCM
 	depends on UNIX
 	default y
 
-config	AF_UNIX_OOB
+config AF_UNIX_OOB
 	bool
 	depends on UNIX
 	default y
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 5 lines · Lukas Bulwahn

The Kconfig parser is quite relaxed when parsing config definition lines. However, there are just a few config definition lines that do not follow the common regular expression 'config [0-9A-Z]', i.e., there are only a few cases where config is not followed by exactly one whitespace.

Quoted 7 lines

To simplify life for kernel developers that use basic regular expressions to find and extract kernel configs, make all config lines follow this common pattern.

No functional change, just helpful stylistic clean-up.

IMHO this is a bit too much noise for a small gain: simple REs can match all the existing patterns with 100% accuracy.

I think this should be dropped.

Cheers,

Paolo