2022-05-20 12:20:13

by Juerg Haefliger

[permalink] [raw]
Subject: [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.

Signed-off-by: Juerg Haefliger <[email protected]>
---
arch/s390/Kconfig | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index e084c72104f8..ae871569dcd6 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -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"
--
2.32.0



2022-05-21 12:54:37

by Juerg Haefliger

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

On Fri, 20 May 2022 10:15:38 -0700
Joe Perches <[email protected]> wrote:

> On Fri, 2022-05-20 at 13:57 +0200, Juerg Haefliger wrote:
> > 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.
> []
> > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> []
> > @@ -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.

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

...Juerg

>


Attachments:
(No filename) (849.00 B)
OpenPGP digital signature

2022-05-23 07:46:22

by Joe Perches

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

On Fri, 2022-05-20 at 13:57 +0200, Juerg Haefliger wrote:
> 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.
[]
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
[]
> @@ -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.



2022-05-23 08:16:35

by Juerg Haefliger

[permalink] [raw]
Subject: [PATCH 1/2 v2] 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.

Signed-off-by: Juerg Haefliger <[email protected]>
---
v2:
Drop trailing endmenu comments.

---
arch/s390/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index e084c72104f8..543e859905df 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -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

--
2.32.0