mm/page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
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
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;
> }
>
>
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;
> }
>
>
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
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;
> }
>
>
© 2016 - 2026 Red Hat, Inc.