Skip to contentSkip to conversation

s390: Kconfig: Style cleanups

PATCH In review Juerg Haefliger 3 participants 10 messages May 20, 2022 – May 25, 2022 s390

lore
Share & tools
lore
#0 lore raw

cover s390: Kconfig: Style cleanups

The majority of the Kconfig files use a single tab for basic indentation and a single tab followed by two whitespaces for help text indentation. Fix the lines that don't follow this convention.

While at it:
- Add trailing comments to endif/endmenu statements for better readability.

Juerg Haefliger (2):
s390: Kconfig: Fix indentation and add comments
s390: Kconfig.debug: Fix indentation

 arch/s390/Kconfig       | 20 ++++++++++----------
 arch/s390/Kconfig.debug | 12 ++++++------
 2 files changed, 16 insertions(+), 16 deletions(-)
Signature · 1 line
2.32.0
#1 lore raw

PATCH 1/2 s390: Kconfig: Fix indentation and add comments

The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules.

While add it, add trailing comments to endmenu statements for better readability.

---
 arch/s390/Kconfig | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
arch/s390/Kconfig +10 -10
index e084c72104f8..ae871569dcd6 100644
@@ -607,7 +607,7 @@ config RANDOMIZE_BASE
 	  as a security feature that deters exploit attempts relying on
 	  knowledge of the location of kernel internals.
 
-endmenu
+endmenu # "Processor type and features"
 
 menu "Memory setup"
 
@@ -655,7 +655,7 @@ config STACK_GUARD
 	  The minimum size for the stack guard should be 256 for 31 bit and
 	  512 for 64 bit.
 
-endmenu
+endmenu # "Memory setup"
 
 menu "I/O subsystem"
 
@@ -736,13 +736,13 @@ config VFIO_AP
 	depends on S390_AP_IOMMU && VFIO_MDEV && KVM
 	depends on ZCRYPT
 	help
-		This driver grants access to Adjunct Processor (AP) devices
-		via the VFIO mediated device interface.
+	  This driver grants access to Adjunct Processor (AP) devices
+	  via the VFIO mediated device interface.
 
-		To compile this driver as a module, choose M here: the module
-		will be called vfio_ap.
+	  To compile this driver as a module, choose M here: the module
+	  will be called vfio_ap.
 
-endmenu
+endmenu # "I/O subsystem"
 
 menu "Dump support"
 
@@ -758,7 +758,7 @@ config CRASH_DUMP
 	  This option also enables s390 zfcpdump.
 	  See also <file:Documentation/s390/zfcpdump.rst>
 
-endmenu
+endmenu # "Dump support"
 
 config CCW
 	def_bool y
@@ -902,7 +902,7 @@ config S390_GUEST
 	  Select this option if you want to run the kernel as a guest under
 	  the KVM hypervisor.
 
-endmenu
+endmenu # "Virtualization"
 
 config S390_MODULES_SANITY_TEST_HELPERS
 	def_bool n
@@ -945,4 +945,4 @@ config S390_MODULES_SANITY_TEST
 	  kernel developers working on architecture code.
 
 	  Say N if you are unsure.
-endmenu
+endmenu # "Selftests"
Signature · 1 line
2.32.0
#2 lore raw

Re: [PATCH 1/2] s390: Kconfig: Fix indentation and add comments

Quoted 6 lines · Juerg Haefliger

The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules.

While add it, add trailing comments to endmenu statements for better readability.

[]

arch/s390/Kconfig

Quoted 1 line
arch/s390/Kconfig +0 -0

[]

arch/s390/Kconfig config RANDOMIZE_BASE · line 610

Quoted 6 lines
arch/s390/Kconfig +1 -1
@@ -607,7 +607,7 @@ config RANDOMIZE_BASE
 	  as a security feature that deters exploit attempts relying on
 	  knowledge of the location of kernel internals.
 
-endmenu
+endmenu # "Processor type and features"

An endmenu comment is relatively unusual.

$ git grep '^endmenu' -- '*/Kconfig*' | wc -l
394
$ git grep '^endmenu.*#' -- '*/Kconfig*' | wc -l
20

I believe it doesn't really help readability.

#3 lore raw

Re: [PATCH 1/2] s390: Kconfig: Fix indentation and add comments

Quoted 19 lines · On Fri, 20 May 2022 10:15:38 -0700 Joe Perches <[email protected]> wrote:
Quoted 6 lines · Juerg Haefliger

The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules.

While add it, add trailing comments to endmenu statements for better readability.

[]

arch/s390/Kconfig

Quoted 1 line
arch/s390/Kconfig +0 -0

[]

arch/s390/Kconfig config RANDOMIZE_BASE · line 610

Quoted 6 lines
arch/s390/Kconfig +1 -1
@@ -607,7 +607,7 @@ config RANDOMIZE_BASE
 	  as a security feature that deters exploit attempts relying on
 	  knowledge of the location of kernel internals.
 
-endmenu
+endmenu # "Processor type and features"  

An endmenu comment is relatively unusual.

Quoted 6 lines
$ git grep '^endmenu' -- '*/Kconfig*' | wc -l
394
$ git grep '^endmenu.*#' -- '*/Kconfig*' | wc -l
20

I believe it doesn't really help readability.

Thanks for the review. Will send a v2 without that.

...Juerg

Quoted 1 line
#4 lore raw

PATCH v2 1/2 s390: Kconfig: Fix indentation

In reply to Joe Perches

The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules.

---
v2:
Drop trailing endmenu comments.

---
 arch/s390/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/s390/Kconfig +4 -4
index e084c72104f8..543e859905df 100644
@@ -736,11 +736,11 @@ config VFIO_AP
 	depends on S390_AP_IOMMU && VFIO_MDEV && KVM
 	depends on ZCRYPT
 	help
-		This driver grants access to Adjunct Processor (AP) devices
-		via the VFIO mediated device interface.
+	  This driver grants access to Adjunct Processor (AP) devices
+	  via the VFIO mediated device interface.
 
-		To compile this driver as a module, choose M here: the module
-		will be called vfio_ap.
+	  To compile this driver as a module, choose M here: the module
+	  will be called vfio_ap.
 
 endmenu
 
Signature · 1 line
2.32.0
#5 lore raw

PATCH 2/2 s390: Kconfig.debug: Fix indentation

In reply to Juerg Haefliger

The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules.

---
 arch/s390/Kconfig.debug | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/s390/Kconfig.debug +6 -6
index e94a2a7f6bf4..c4300ea4abf8 100644
@@ -14,9 +14,9 @@ config DEBUG_ENTRY
 	  If unsure, say N.
 
 config CIO_INJECT
-       bool "CIO Inject interfaces"
-       depends on DEBUG_KERNEL && DEBUG_FS
-       help
-	This option provides a debugging facility to inject certain artificial events
-	and instruction responses to the CIO layer of Linux kernel. The newly created
-	debugfs user-interfaces will be at /sys/kernel/debug/s390/cio/*
+	bool "CIO Inject interfaces"
+	depends on DEBUG_KERNEL && DEBUG_FS
+	help
+	  This option provides a debugging facility to inject certain artificial events
+	  and instruction responses to the CIO layer of Linux kernel. The newly created
+	  debugfs user-interfaces will be at /sys/kernel/debug/s390/cio/*
Signature · 1 line
2.32.0
maintainer
#6 lore raw
In reply to Juerg Haefliger
Quoted 8 lines · Juerg Haefliger

The majority of the Kconfig files use a single tab for basic indentation and a single tab followed by two whitespaces for help text indentation. Fix the lines that don't follow this convention.

While at it:
- Add trailing comments to endif/endmenu statements for better readability.

Quoted 7 lines

Juerg Haefliger (2):
s390: Kconfig: Fix indentation and add comments
s390: Kconfig.debug: Fix indentation

 arch/s390/Kconfig       | 20 ++++++++++----------
 arch/s390/Kconfig.debug | 12 ++++++------
 2 files changed, 16 insertions(+), 16 deletions(-)

Both applied (v2 for the first patch). Thanks!

maintainer
#7 lore raw
Quoted 13 lines · Heiko Carstens
Quoted 12 lines · Juerg Haefliger

The majority of the Kconfig files use a single tab for basic indentation and a single tab followed by two whitespaces for help text indentation. Fix the lines that don't follow this convention.

While at it:
- Add trailing comments to endif/endmenu statements for better readability.

Juerg Haefliger (2):
s390: Kconfig: Fix indentation and add comments
s390: Kconfig.debug: Fix indentation

Quoted 5 lines
Quoted 3 lines
 arch/s390/Kconfig       | 20 ++++++++++----------
 arch/s390/Kconfig.debug | 12 ++++++------
 2 files changed, 16 insertions(+), 16 deletions(-)

Both applied (v2 for the first patch). Thanks!

..and removed both patches again. Please make sure that your email addresses match. That is: the email address you use for signing off and the one you use for sending. Right now there is a mismatch when I apply your patches in "From:" and "Signed-off-by:".

Please resend.

#8 lore raw

PATCH v3 1/2 s390: Kconfig: Fix indentation

The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules.

---
v3:
Change author and sob email addresses to match sender email address.
v2:
Drop trailing endmenu comments.

---
 arch/s390/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/s390/Kconfig +4 -4
index e084c72104f8..543e859905df 100644
@@ -736,11 +736,11 @@ config VFIO_AP
 	depends on S390_AP_IOMMU && VFIO_MDEV && KVM
 	depends on ZCRYPT
 	help
-		This driver grants access to Adjunct Processor (AP) devices
-		via the VFIO mediated device interface.
+	  This driver grants access to Adjunct Processor (AP) devices
+	  via the VFIO mediated device interface.
 
-		To compile this driver as a module, choose M here: the module
-		will be called vfio_ap.
+	  To compile this driver as a module, choose M here: the module
+	  will be called vfio_ap.
 
 endmenu
 
Signature · 1 line
2.32.0
#9 lore raw

PATCH v2 2/2 s390: Kconfig.debug: Fix indentation

In reply to Heiko Carstens

The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules.

---
v2:
Change author and sob email addresses to match sender email address.

---
 arch/s390/Kconfig.debug | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/s390/Kconfig.debug +6 -6
index e94a2a7f6bf4..c4300ea4abf8 100644
@@ -14,9 +14,9 @@ config DEBUG_ENTRY
 	  If unsure, say N.
 
 config CIO_INJECT
-       bool "CIO Inject interfaces"
-       depends on DEBUG_KERNEL && DEBUG_FS
-       help
-	This option provides a debugging facility to inject certain artificial events
-	and instruction responses to the CIO layer of Linux kernel. The newly created
-	debugfs user-interfaces will be at /sys/kernel/debug/s390/cio/*
+	bool "CIO Inject interfaces"
+	depends on DEBUG_KERNEL && DEBUG_FS
+	help
+	  This option provides a debugging facility to inject certain artificial events
+	  and instruction responses to the CIO layer of Linux kernel. The newly created
+	  debugfs user-interfaces will be at /sys/kernel/debug/s390/cio/*
Signature · 1 line
2.32.0