* [PATCH] mm/debug: fix missing space in case statement
@ 2025-11-03 6:59 Zhang Chujun
2025-11-03 8:46 ` Dev Jain
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Zhang Chujun @ 2025-11-03 6:59 UTC (permalink / raw)
To: akpm; +Cc: vbabka, linux-mm, Zhang Chujun
In the setup_vm_debug() function, the case statement for 'p' option
is written as 'case'p':' without a space between 'case' and the
character constant. While this is syntactically valid C, it violates
the Linux kernel coding style, which requires a space after 'case'.
This patch adds the missing space to comply with coding standards.
Signed-off-by: Zhang Chujun <zhangchujun@cmss.chinamobile.com>
diff --git a/mm/debug.c b/mm/debug.c
index 64ddb0c4b4be..d860864063be 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -327,7 +327,7 @@ static int __init setup_vm_debug(char *str)
while (*str) {
switch (tolower(*str)) {
- case'p':
+ case 'p':
__page_init_poisoning = true;
break;
default:
--
2.50.1.windows.1
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] mm/debug: fix missing space in case statement
2025-11-03 6:59 [PATCH] mm/debug: fix missing space in case statement Zhang Chujun
@ 2025-11-03 8:46 ` Dev Jain
2025-11-03 9:38 ` Vlastimil Babka
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Dev Jain @ 2025-11-03 8:46 UTC (permalink / raw)
To: Zhang Chujun, akpm; +Cc: vbabka, linux-mm
On 03/11/25 12:29 pm, Zhang Chujun wrote:
> In the setup_vm_debug() function, the case statement for 'p' option
> is written as 'case'p':' without a space between 'case' and the
> character constant. While this is syntactically valid C, it violates
> the Linux kernel coding style, which requires a space after 'case'.
> This patch adds the missing space to comply with coding standards.
>
> Signed-off-by: Zhang Chujun <zhangchujun@cmss.chinamobile.com>
Reviewed-by: Dev Jain <dev.jain@arm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] mm/debug: fix missing space in case statement
2025-11-03 6:59 [PATCH] mm/debug: fix missing space in case statement Zhang Chujun
2025-11-03 8:46 ` Dev Jain
@ 2025-11-03 9:38 ` Vlastimil Babka
2025-11-03 14:55 ` David Hildenbrand
2025-11-03 16:25 ` Vishal Moola (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: Vlastimil Babka @ 2025-11-03 9:38 UTC (permalink / raw)
To: Zhang Chujun, akpm; +Cc: linux-mm
On 11/3/25 07:59, Zhang Chujun wrote:
> In the setup_vm_debug() function, the case statement for 'p' option
> is written as 'case'p':' without a space between 'case' and the
> character constant. While this is syntactically valid C, it violates
> the Linux kernel coding style, which requires a space after 'case'.
> This patch adds the missing space to comply with coding standards.
>
> Signed-off-by: Zhang Chujun <zhangchujun@cmss.chinamobile.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
>
> diff --git a/mm/debug.c b/mm/debug.c
> index 64ddb0c4b4be..d860864063be 100644
> --- a/mm/debug.c
> +++ b/mm/debug.c
> @@ -327,7 +327,7 @@ static int __init setup_vm_debug(char *str)
>
> while (*str) {
> switch (tolower(*str)) {
> - case'p':
> + case 'p':
> __page_init_poisoning = true;
> break;
> default:
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] mm/debug: fix missing space in case statement
2025-11-03 6:59 [PATCH] mm/debug: fix missing space in case statement Zhang Chujun
2025-11-03 8:46 ` Dev Jain
2025-11-03 9:38 ` Vlastimil Babka
@ 2025-11-03 14:55 ` David Hildenbrand
2025-11-03 16:25 ` Vishal Moola (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand @ 2025-11-03 14:55 UTC (permalink / raw)
To: Zhang Chujun, akpm; +Cc: vbabka, linux-mm
On 03.11.25 07:59, Zhang Chujun wrote:
> In the setup_vm_debug() function, the case statement for 'p' option
> is written as 'case'p':' without a space between 'case' and the
> character constant. While this is syntactically valid C, it violates
> the Linux kernel coding style, which requires a space after 'case'.
> This patch adds the missing space to comply with coding standards.
>
> Signed-off-by: Zhang Chujun <zhangchujun@cmss.chinamobile.com>
>
> diff --git a/mm/debug.c b/mm/debug.c
> index 64ddb0c4b4be..d860864063be 100644
> --- a/mm/debug.c
> +++ b/mm/debug.c
> @@ -327,7 +327,7 @@ static int __init setup_vm_debug(char *str)
>
> while (*str) {
> switch (tolower(*str)) {
> - case'p':
> + case 'p':
Acked-by: David Hildenbrand <david@redhat.com>
Surprised that this compiles.
--
Cheers
David
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] mm/debug: fix missing space in case statement
2025-11-03 6:59 [PATCH] mm/debug: fix missing space in case statement Zhang Chujun
` (2 preceding siblings ...)
2025-11-03 14:55 ` David Hildenbrand
@ 2025-11-03 16:25 ` Vishal Moola (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: Vishal Moola (Oracle) @ 2025-11-03 16:25 UTC (permalink / raw)
To: Zhang Chujun; +Cc: akpm, vbabka, linux-mm
On Mon, Nov 03, 2025 at 02:59:09PM +0800, Zhang Chujun wrote:
> In the setup_vm_debug() function, the case statement for 'p' option
> is written as 'case'p':' without a space between 'case' and the
> character constant. While this is syntactically valid C, it violates
> the Linux kernel coding style, which requires a space after 'case'.
> This patch adds the missing space to comply with coding standards.
>
> Signed-off-by: Zhang Chujun <zhangchujun@cmss.chinamobile.com>
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-03 16:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-03 6:59 [PATCH] mm/debug: fix missing space in case statement Zhang Chujun
2025-11-03 8:46 ` Dev Jain
2025-11-03 9:38 ` Vlastimil Babka
2025-11-03 14:55 ` David Hildenbrand
2025-11-03 16:25 ` Vishal Moola (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox