linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs
@ 2026-04-16  2:19 Xiang Gao
  2026-04-16  4:22 ` Donet Tom
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Xiang Gao @ 2026-04-16  2:19 UTC (permalink / raw)
  To: akpm, vbabka
  Cc: surenb, mhocko, jackmanb, hannes, ziy, linux-mm, linux-kernel, Xiang Gao

From: Xiang Gao <gaoxiang17@xiaomi.com>

checkpatch.pl reports two indentation errors in page_alloc.c where
spaces are used instead of tabs:

  ERROR: code indent should use tabs where possible
  #887: FILE: mm/page_alloc.c:887:
  +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$

  ERROR: code indent should use tabs where possible
  #6626: FILE: mm/page_alloc.c:6626:
  +						         sysctl_min_unmapped_ratio) / 100;$

In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
spaces for indentation instead of a tab. The identical VM_WARN_ONCE
calls in __add_to_free_list() and move_to_free_list() both correctly
use a tab.

In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
+ 1 space to correctly align with the opening parenthesis on the
previous line.

Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>
---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2d4b6f1a554e..752673a9b43c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
 {
 	int nr_pages = 1 << order;
 
-        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
+	VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
 		     "page type is %d, passed migratetype is %d (nr=%d)\n",
 		     get_pageblock_migratetype(page), migratetype, nr_pages);
 
@@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
 
 	for_each_zone(zone)
 		zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
-						         sysctl_min_unmapped_ratio) / 100;
+						 sysctl_min_unmapped_ratio) / 100;
 }
 
 
-- 
2.34.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  2:19 [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs Xiang Gao
@ 2026-04-16  4:22 ` Donet Tom
  2026-04-16  5:19   ` 答复: [External Mail]Re: " 高翔
  2026-04-16  5:27 ` [PATCH v2] " Xiang Gao
  2026-04-16  6:40 ` [PATCH] " Vlastimil Babka (SUSE)
  2 siblings, 1 reply; 11+ messages in thread
From: Donet Tom @ 2026-04-16  4:22 UTC (permalink / raw)
  To: Xiang Gao, akpm, vbabka
  Cc: surenb, mhocko, jackmanb, hannes, ziy, linux-mm, linux-kernel, Xiang Gao

Hi

On 4/16/26 7:49 AM, Xiang Gao wrote:
> From: Xiang Gao <gaoxiang17@xiaomi.com>
>
> checkpatch.pl reports two indentation errors in page_alloc.c where
> spaces are used instead of tabs:
>
>    ERROR: code indent should use tabs where possible
>    #887: FILE: mm/page_alloc.c:887:
>    +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$
>
>    ERROR: code indent should use tabs where possible
>    #6626: FILE: mm/page_alloc.c:6626:
>    +						         sysctl_min_unmapped_ratio) / 100;$
>
> In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
> spaces for indentation instead of a tab. The identical VM_WARN_ONCE
> calls in __add_to_free_list() and move_to_free_list() both correctly
> use a tab.
>
> In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
> tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
> + 1 space to correctly align with the opening parenthesis on the
> previous line.
>
> Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>
>
I am seeing below issue with checkpatch.pl

./scripts/checkpatch.pl --strict 
0001-mm-page_alloc-fix-spaces-used-for-indentation-instea.patch
WARNING: From:/Signed-off-by: email name mismatch: 'From: Xiang Gao 
<gaoxiang17@xiaomi.com>' != 'Signed-off-by: gaoxiang17 
<gaoxiang17@xiaomi.com>'

-Donet

> ---
>   mm/page_alloc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2d4b6f1a554e..752673a9b43c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
>   {
>   	int nr_pages = 1 << order;
>   
> -        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
> +	VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
>   		     "page type is %d, passed migratetype is %d (nr=%d)\n",
>   		     get_pageblock_migratetype(page), migratetype, nr_pages);
>   
> @@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
>   
>   	for_each_zone(zone)
>   		zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
> -						         sysctl_min_unmapped_ratio) / 100;
> +						 sysctl_min_unmapped_ratio) / 100;
>   }
>   
>   


^ permalink raw reply	[flat|nested] 11+ messages in thread

* 答复: [External Mail]Re: [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  4:22 ` Donet Tom
@ 2026-04-16  5:19   ` 高翔
  0 siblings, 0 replies; 11+ messages in thread
From: 高翔 @ 2026-04-16  5:19 UTC (permalink / raw)
  To: Donet Tom, Xiang Gao, akpm, vbabka
  Cc: surenb, mhocko, jackmanb, hannes, ziy, linux-mm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3120 bytes --]


Hi,

Thanks for catching this. I'll fix the Signed-off-by name mismatch and send a v2.

Best regards,Xiang Gao


________________________________
发件人: Donet Tom <donettom@linux.ibm.com>
发送时间: 2026年4月16日 12:22:11
收件人: Xiang Gao; akpm@linux-foundation.org; vbabka@kernel.org
抄送: surenb@google.com; mhocko@suse.com; jackmanb@google.com; hannes@cmpxchg.org; ziy@nvidia.com; linux-mm@kvack.org; linux-kernel@vger.kernel.org; 高翔
主题: [External Mail]Re: [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Hi

On 4/16/26 7:49 AM, Xiang Gao wrote:
> From: Xiang Gao <gaoxiang17@xiaomi.com>
>
> checkpatch.pl reports two indentation errors in page_alloc.c where
> spaces are used instead of tabs:
>
>    ERROR: code indent should use tabs where possible
>    #887: FILE: mm/page_alloc.c:887:
>    +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$
>
>    ERROR: code indent should use tabs where possible
>    #6626: FILE: mm/page_alloc.c:6626:
>    +                                                   sysctl_min_unmapped_ratio) / 100;$
>
> In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
> spaces for indentation instead of a tab. The identical VM_WARN_ONCE
> calls in __add_to_free_list() and move_to_free_list() both correctly
> use a tab.
>
> In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
> tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
> + 1 space to correctly align with the opening parenthesis on the
> previous line.
>
> Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>
>
I am seeing below issue with checkpatch.pl

./scripts/checkpatch.pl --strict
0001-mm-page_alloc-fix-spaces-used-for-indentation-instea.patch
WARNING: From:/Signed-off-by: email name mismatch: 'From: Xiang Gao
<gaoxiang17@xiaomi.com>' != 'Signed-off-by: gaoxiang17
<gaoxiang17@xiaomi.com>'

-Donet

> ---
>   mm/page_alloc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2d4b6f1a554e..752673a9b43c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
>   {
>       int nr_pages = 1 << order;
>
> -        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
> +     VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
>                    "page type is %d, passed migratetype is %d (nr=%d)\n",
>                    get_pageblock_migratetype(page), migratetype, nr_pages);
>
> @@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
>
>       for_each_zone(zone)
>               zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
> -                                                      sysctl_min_unmapped_ratio) / 100;
> +                                              sysctl_min_unmapped_ratio) / 100;
>   }
>
>

[-- Attachment #2: Type: text/html, Size: 6562 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  2:19 [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs Xiang Gao
  2026-04-16  4:22 ` Donet Tom
@ 2026-04-16  5:27 ` Xiang Gao
  2026-04-16  5:48   ` Donet Tom
  2026-04-16  6:34   ` Dev Jain
  2026-04-16  6:40 ` [PATCH] " Vlastimil Babka (SUSE)
  2 siblings, 2 replies; 11+ messages in thread
From: Xiang Gao @ 2026-04-16  5:27 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, donet.tom, Xiang Gao

From: Xiang Gao <gaoxiang17@xiaomi.com>

checkpatch.pl reports two indentation errors in page_alloc.c where
spaces are used instead of tabs:

  ERROR: code indent should use tabs where possible
  #887: FILE: mm/page_alloc.c:887:
  +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$

  ERROR: code indent should use tabs where possible
  #6626: FILE: mm/page_alloc.c:6626:
  +						         sysctl_min_unmapped_ratio) / 100;$

In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
spaces for indentation instead of a tab. The identical VM_WARN_ONCE
calls in __add_to_free_list() and move_to_free_list() both correctly
use a tab.

In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
+ 1 space to correctly align with the opening parenthesis on the
previous line.

Signed-off-by: Xiang Gao <gaoxiang17@xiaomi.com>
---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2d4b6f1a554e..752673a9b43c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
 {
 	int nr_pages = 1 << order;
 
-        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
+	VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
 		     "page type is %d, passed migratetype is %d (nr=%d)\n",
 		     get_pageblock_migratetype(page), migratetype, nr_pages);
 
@@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
 
 	for_each_zone(zone)
 		zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
-						         sysctl_min_unmapped_ratio) / 100;
+						 sysctl_min_unmapped_ratio) / 100;
 }
 
 
-- 
2.34.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  5:27 ` [PATCH v2] " Xiang Gao
@ 2026-04-16  5:48   ` Donet Tom
  2026-04-16  6:21     ` 答复: [External Mail]Re: " 高翔
  2026-04-16  6:25     ` 高翔
  2026-04-16  6:34   ` Dev Jain
  1 sibling, 2 replies; 11+ messages in thread
From: Donet Tom @ 2026-04-16  5:48 UTC (permalink / raw)
  To: Xiang Gao, Andrew Morton; +Cc: linux-mm, linux-kernel, donet.tom, Xiang Gao

[-- Attachment #1: Type: text/plain, Size: 2092 bytes --]

Hi

On 4/16/26 10:57 AM, Xiang Gao wrote:
> From: Xiang Gao<gaoxiang17@xiaomi.com>
>
> checkpatch.pl reports two indentation errors in page_alloc.c where
> spaces are used instead of tabs:
>
>    ERROR: code indent should use tabs where possible
>    #887: FILE: mm/page_alloc.c:887:
>    +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$
>
>    ERROR: code indent should use tabs where possible
>    #6626: FILE: mm/page_alloc.c:6626:
>    +						         sysctl_min_unmapped_ratio) / 100;$
>
> In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
> spaces for indentation instead of a tab. The identical VM_WARN_ONCE
> calls in __add_to_free_list() and move_to_free_list() both correctly
> use a tab.
>
> In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
> tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
> + 1 space to correctly align with the opening parenthesis on the
> previous line.
>
> Signed-off-by: Xiang Gao<gaoxiang17@xiaomi.com>


It might be better to send v2 as a new series next time —just a suggestion.

LGTM Reviewed by: Donet Tom <donettom@linux.ibm.com> -Donet

> ---
>   mm/page_alloc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2d4b6f1a554e..752673a9b43c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
>   {
>   	int nr_pages = 1 << order;
>   
> -        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
> +	VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
>   		     "page type is %d, passed migratetype is %d (nr=%d)\n",
>   		     get_pageblock_migratetype(page), migratetype, nr_pages);
>   
> @@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
>   
>   	for_each_zone(zone)
>   		zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
> -						         sysctl_min_unmapped_ratio) / 100;
> +						 sysctl_min_unmapped_ratio) / 100;
>   }
>   
>   

[-- Attachment #2: Type: text/html, Size: 3462 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* 答复: [External Mail]Re: [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  5:48   ` Donet Tom
@ 2026-04-16  6:21     ` 高翔
  2026-04-16  6:25     ` 高翔
  1 sibling, 0 replies; 11+ messages in thread
From: 高翔 @ 2026-04-16  6:21 UTC (permalink / raw)
  To: Donet Tom, Xiang Gao, Andrew Morton; +Cc: linux-mm, linux-kernel, donet.tom

[-- Attachment #1: Type: text/plain, Size: 2771 bytes --]

ok, thanks.

________________________________
发件人: Donet Tom <donettom@linux.ibm.com>
发送时间: 2026年4月16日 13:48:23
收件人: Xiang Gao; Andrew Morton
抄送: linux-mm@kvack.org; linux-kernel@vger.kernel.org; donet.tom@gmail.com; 高翔
主题: [External Mail]Re: [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs


[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Hi

On 4/16/26 10:57 AM, Xiang Gao wrote:

From: Xiang Gao <gaoxiang17@xiaomi.com><mailto:gaoxiang17@xiaomi.com>

checkpatch.pl reports two indentation errors in page_alloc.c where
spaces are used instead of tabs:

  ERROR: code indent should use tabs where possible
  #887: FILE: mm/page_alloc.c:887:
  +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$

  ERROR: code indent should use tabs where possible
  #6626: FILE: mm/page_alloc.c:6626:
  +                                                      sysctl_min_unmapped_ratio) / 100;$

In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
spaces for indentation instead of a tab. The identical VM_WARN_ONCE
calls in __add_to_free_list() and move_to_free_list() both correctly
use a tab.

In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
+ 1 space to correctly align with the opening parenthesis on the
previous line.

Signed-off-by: Xiang Gao <gaoxiang17@xiaomi.com><mailto:gaoxiang17@xiaomi.com>


It might be better to send v2 as a new series next time ―just a suggestion.


LGTM Reviewed by: Donet Tom <donettom@linux.ibm.com><mailto:donettom@linux.ibm.com> -Donet


---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2d4b6f1a554e..752673a9b43c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
 {
        int nr_pages = 1 << order;

-        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
+       VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
                     "page type is %d, passed migratetype is %d (nr=%d)\n",
                     get_pageblock_migratetype(page), migratetype, nr_pages);

@@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)

        for_each_zone(zone)
                zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
-                                                        sysctl_min_unmapped_ratio) / 100;
+                                                sysctl_min_unmapped_ratio) / 100;
 }




[-- Attachment #2: Type: text/html, Size: 4665 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* 答复: [External Mail]Re: [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  5:48   ` Donet Tom
  2026-04-16  6:21     ` 答复: [External Mail]Re: " 高翔
@ 2026-04-16  6:25     ` 高翔
  1 sibling, 0 replies; 11+ messages in thread
From: 高翔 @ 2026-04-16  6:25 UTC (permalink / raw)
  To: Donet Tom, Xiang Gao, Andrew Morton; +Cc: linux-mm, linux-kernel, donet.tom

[-- Attachment #1: Type: text/plain, Size: 2923 bytes --]

I've sent the updated patches as v3 with your Reviewed-by tag included. Thank you for the review and the suggestion ― I'll send v2/v3 as new series going forward.

________________________________
发件人: Donet Tom <donettom@linux.ibm.com>
发送时间: 2026年4月16日 13:48:23
收件人: Xiang Gao; Andrew Morton
抄送: linux-mm@kvack.org; linux-kernel@vger.kernel.org; donet.tom@gmail.com; 高翔
主题: [External Mail]Re: [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs


[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Hi

On 4/16/26 10:57 AM, Xiang Gao wrote:

From: Xiang Gao <gaoxiang17@xiaomi.com><mailto:gaoxiang17@xiaomi.com>

checkpatch.pl reports two indentation errors in page_alloc.c where
spaces are used instead of tabs:

  ERROR: code indent should use tabs where possible
  #887: FILE: mm/page_alloc.c:887:
  +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$

  ERROR: code indent should use tabs where possible
  #6626: FILE: mm/page_alloc.c:6626:
  +                                                      sysctl_min_unmapped_ratio) / 100;$

In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
spaces for indentation instead of a tab. The identical VM_WARN_ONCE
calls in __add_to_free_list() and move_to_free_list() both correctly
use a tab.

In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
+ 1 space to correctly align with the opening parenthesis on the
previous line.

Signed-off-by: Xiang Gao <gaoxiang17@xiaomi.com><mailto:gaoxiang17@xiaomi.com>


It might be better to send v2 as a new series next time ―just a suggestion.


LGTM Reviewed by: Donet Tom <donettom@linux.ibm.com><mailto:donettom@linux.ibm.com> -Donet


---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2d4b6f1a554e..752673a9b43c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
 {
        int nr_pages = 1 << order;

-        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
+       VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
                     "page type is %d, passed migratetype is %d (nr=%d)\n",
                     get_pageblock_migratetype(page), migratetype, nr_pages);

@@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)

        for_each_zone(zone)
                zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
-                                                        sysctl_min_unmapped_ratio) / 100;
+                                                sysctl_min_unmapped_ratio) / 100;
 }




[-- Attachment #2: Type: text/html, Size: 4836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  5:27 ` [PATCH v2] " Xiang Gao
  2026-04-16  5:48   ` Donet Tom
@ 2026-04-16  6:34   ` Dev Jain
  2026-04-16  6:48     ` 答复: [External Mail]Re: " 高翔
  1 sibling, 1 reply; 11+ messages in thread
From: Dev Jain @ 2026-04-16  6:34 UTC (permalink / raw)
  To: Xiang Gao, Andrew Morton; +Cc: linux-mm, linux-kernel, donet.tom, Xiang Gao



On 16/04/26 10:57 am, Xiang Gao wrote:
> From: Xiang Gao <gaoxiang17@xiaomi.com>
> 
> checkpatch.pl reports two indentation errors in page_alloc.c where
> spaces are used instead of tabs:
> 
>   ERROR: code indent should use tabs where possible
>   #887: FILE: mm/page_alloc.c:887:
>   +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$
> 
>   ERROR: code indent should use tabs where possible
>   #6626: FILE: mm/page_alloc.c:6626:
>   +						         sysctl_min_unmapped_ratio) / 100;$
> 
> In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
> spaces for indentation instead of a tab. The identical VM_WARN_ONCE
> calls in __add_to_free_list() and move_to_free_list() both correctly
> use a tab.
> 
> In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
> tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs

6 tabs + 9 spaces -> 7 tabs + 1 space.


> + 1 space to correctly align with the opening parenthesis on the
> previous line.
> 
> Signed-off-by: Xiang Gao <gaoxiang17@xiaomi.com>
> ---
>  mm/page_alloc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2d4b6f1a554e..752673a9b43c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
>  {
>  	int nr_pages = 1 << order;
>  
> -        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
> +	VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
>  		     "page type is %d, passed migratetype is %d (nr=%d)\n",
>  		     get_pageblock_migratetype(page), migratetype, nr_pages);
>  
> @@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
>  
>  	for_each_zone(zone)
>  		zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
> -						         sysctl_min_unmapped_ratio) / 100;
> +						 sysctl_min_unmapped_ratio) / 100;
>  }
>  
>  



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  2:19 [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs Xiang Gao
  2026-04-16  4:22 ` Donet Tom
  2026-04-16  5:27 ` [PATCH v2] " Xiang Gao
@ 2026-04-16  6:40 ` Vlastimil Babka (SUSE)
  2026-04-16  6:51   ` 答复: [External Mail]Re: " 高翔
  2 siblings, 1 reply; 11+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-04-16  6:40 UTC (permalink / raw)
  To: Xiang Gao, akpm
  Cc: surenb, mhocko, jackmanb, hannes, ziy, linux-mm, linux-kernel, Xiang Gao

On 4/16/26 04:19, Xiang Gao wrote:
> From: Xiang Gao <gaoxiang17@xiaomi.com>
> 
> checkpatch.pl reports two indentation errors in page_alloc.c where
> spaces are used instead of tabs:

checkpatch should not be used on existing source files, only on patches
changing them for another reason. There are many pre-existing things that
would be flagged and we don't want the churn. So we only use checkpatch to
avoid introducing new mistakes, and only fix the pre-existing ones when
changing the code for another reason.

>   ERROR: code indent should use tabs where possible
>   #887: FILE: mm/page_alloc.c:887:
>   +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$
> 
>   ERROR: code indent should use tabs where possible
>   #6626: FILE: mm/page_alloc.c:6626:
>   +						         sysctl_min_unmapped_ratio) / 100;$
> 
> In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
> spaces for indentation instead of a tab. The identical VM_WARN_ONCE
> calls in __add_to_free_list() and move_to_free_list() both correctly
> use a tab.
> 
> In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
> tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
> + 1 space to correctly align with the opening parenthesis on the
> previous line.
> 
> Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>
> ---
>  mm/page_alloc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2d4b6f1a554e..752673a9b43c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
>  {
>  	int nr_pages = 1 << order;
>  
> -        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
> +	VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
>  		     "page type is %d, passed migratetype is %d (nr=%d)\n",
>  		     get_pageblock_migratetype(page), migratetype, nr_pages);
>  
> @@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
>  
>  	for_each_zone(zone)
>  		zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
> -						         sysctl_min_unmapped_ratio) / 100;
> +						 sysctl_min_unmapped_ratio) / 100;
>  }
>  
>  



^ permalink raw reply	[flat|nested] 11+ messages in thread

* 答复: [External Mail]Re: [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  6:34   ` Dev Jain
@ 2026-04-16  6:48     ` 高翔
  0 siblings, 0 replies; 11+ messages in thread
From: 高翔 @ 2026-04-16  6:48 UTC (permalink / raw)
  To: Dev Jain, Xiang Gao, Andrew Morton; +Cc: linux-mm, linux-kernel, donet.tom

[-- Attachment #1: Type: text/plain, Size: 2957 bytes --]

You're right, "6 tabs + 9 spaces" is effectively "7 tabs + 1 space" since 8 of those spaces equal one tab width. The description in the commit message should have phrased it that way. The actual code change is correct ― the result is 6 tabs + 1 space to align with the opening parenthesis on the previous line. Thank you for the review.


________________________________
发件人: Dev Jain <dev.jain@arm.com>
发送时间: 2026年4月16日 14:34:42
收件人: Xiang Gao; Andrew Morton
抄送: linux-mm@kvack.org; linux-kernel@vger.kernel.org; donet.tom@gmail.com; 高翔
主题: [External Mail]Re: [PATCH v2] mm/page_alloc: fix spaces used for indentation instead of tabs

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

On 16/04/26 10:57 am, Xiang Gao wrote:
> From: Xiang Gao <gaoxiang17@xiaomi.com>
>
> checkpatch.pl reports two indentation errors in page_alloc.c where
> spaces are used instead of tabs:
>
>   ERROR: code indent should use tabs where possible
>   #887: FILE: mm/page_alloc.c:887:
>   +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$
>
>   ERROR: code indent should use tabs where possible
>   #6626: FILE: mm/page_alloc.c:6626:
>   +                                                    sysctl_min_unmapped_ratio) / 100;$
>
> In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
> spaces for indentation instead of a tab. The identical VM_WARN_ONCE
> calls in __add_to_free_list() and move_to_free_list() both correctly
> use a tab.
>
> In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
> tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs

6 tabs + 9 spaces -> 7 tabs + 1 space.


> + 1 space to correctly align with the opening parenthesis on the
> previous line.
>
> Signed-off-by: Xiang Gao <gaoxiang17@xiaomi.com>
> ---
>  mm/page_alloc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2d4b6f1a554e..752673a9b43c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
>  {
>       int nr_pages = 1 << order;
>
> -        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
> +     VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
>                    "page type is %d, passed migratetype is %d (nr=%d)\n",
>                    get_pageblock_migratetype(page), migratetype, nr_pages);
>
> @@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
>
>       for_each_zone(zone)
>               zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
> -                                                      sysctl_min_unmapped_ratio) / 100;
> +                                              sysctl_min_unmapped_ratio) / 100;
>  }
>
>


[-- Attachment #2: Type: text/html, Size: 5810 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* 答复: [External Mail]Re: [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs
  2026-04-16  6:40 ` [PATCH] " Vlastimil Babka (SUSE)
@ 2026-04-16  6:51   ` 高翔
  0 siblings, 0 replies; 11+ messages in thread
From: 高翔 @ 2026-04-16  6:51 UTC (permalink / raw)
  To: Vlastimil Babka (SUSE), Xiang Gao, akpm
  Cc: surenb, mhocko, jackmanb, hannes, ziy, linux-mm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3220 bytes --]

Thank you for the feedback. I understand ― checkpatch should only be used on patches, not to find and fix pre-existing style issues in existing code. I'll keep this in mind for future submissions. Sorry for the noise.

________________________________
发件人: Vlastimil Babka (SUSE) <vbabka@kernel.org>
发送时间: 2026年4月16日 14:40:31
收件人: Xiang Gao; akpm@linux-foundation.org
抄送: surenb@google.com; mhocko@suse.com; jackmanb@google.com; hannes@cmpxchg.org; ziy@nvidia.com; linux-mm@kvack.org; linux-kernel@vger.kernel.org; 高翔
主题: [External Mail]Re: [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

On 4/16/26 04:19, Xiang Gao wrote:
> From: Xiang Gao <gaoxiang17@xiaomi.com>
>
> checkpatch.pl reports two indentation errors in page_alloc.c where
> spaces are used instead of tabs:

checkpatch should not be used on existing source files, only on patches
changing them for another reason. There are many pre-existing things that
would be flagged and we don't want the churn. So we only use checkpatch to
avoid introducing new mistakes, and only fix the pre-existing ones when
changing the code for another reason.

>   ERROR: code indent should use tabs where possible
>   #887: FILE: mm/page_alloc.c:887:
>   +        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$
>
>   ERROR: code indent should use tabs where possible
>   #6626: FILE: mm/page_alloc.c:6626:
>   +                                                    sysctl_min_unmapped_ratio) / 100;$
>
> In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8
> spaces for indentation instead of a tab. The identical VM_WARN_ONCE
> calls in __add_to_free_list() and move_to_free_list() both correctly
> use a tab.
>
> In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6
> tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs
> + 1 space to correctly align with the opening parenthesis on the
> previous line.
>
> Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>
> ---
>  mm/page_alloc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2d4b6f1a554e..752673a9b43c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon
>  {
>       int nr_pages = 1 << order;
>
> -        VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
> +     VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,
>                    "page type is %d, passed migratetype is %d (nr=%d)\n",
>                    get_pageblock_migratetype(page), migratetype, nr_pages);
>
> @@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void)
>
>       for_each_zone(zone)
>               zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) *
> -                                                      sysctl_min_unmapped_ratio) / 100;
> +                                              sysctl_min_unmapped_ratio) / 100;
>  }
>
>


[-- Attachment #2: Type: text/html, Size: 5986 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-04-16  6:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-16  2:19 [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs Xiang Gao
2026-04-16  4:22 ` Donet Tom
2026-04-16  5:19   ` 答复: [External Mail]Re: " 高翔
2026-04-16  5:27 ` [PATCH v2] " Xiang Gao
2026-04-16  5:48   ` Donet Tom
2026-04-16  6:21     ` 答复: [External Mail]Re: " 高翔
2026-04-16  6:25     ` 高翔
2026-04-16  6:34   ` Dev Jain
2026-04-16  6:48     ` 答复: [External Mail]Re: " 高翔
2026-04-16  6:40 ` [PATCH] " Vlastimil Babka (SUSE)
2026-04-16  6:51   ` 答复: [External Mail]Re: " 高翔

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox