2024-03-27 22:14:02

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the mm tree

Hi all,

After merging the mm tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

mm/page_alloc.c: In function 'build_zonelists':
mm/page_alloc.c:5324:13: warning: unused variable 'node' [-Wunused-variable]
5324 | int node, local_node;
| ^~~~

Introduced by commit

95d0185255a3 ("mm/page_alloc.c: remove unneeded codes in !NUMA version of build_zonelists()")

from the mm-unstable branch of the mm tree.
--
Cheers,
Stephen Rothwell


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

2024-03-28 02:00:20

by Baoquan He

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the mm tree

On 03/28/24 at 09:13am, Stephen Rothwell wrote:
> Hi all,
>
> After merging the mm tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>
> mm/page_alloc.c: In function 'build_zonelists':
> mm/page_alloc.c:5324:13: warning: unused variable 'node' [-Wunused-variable]
> 5324 | int node, local_node;
> | ^~~~
>
> Introduced by commit
>
> 95d0185255a3 ("mm/page_alloc.c: remove unneeded codes in !NUMA version of build_zonelists()")
>
> from the mm-unstable branch of the mm tree.

Thanks. Below code change has been queued on mm-unstable branch to fix it.

From 6bb5aa700a6221248df150cba3d9c54cd95bed97 Mon Sep 17 00:00:00 2001
From: Baoquan He <[email protected]>
Date: Wed, 27 Mar 2024 20:06:45 +0800
Subject: [PATCH]
mm-page_allocc-remove-unneeded-codes-in-numa-version-of-build_zonelists-v2
Content-type: text/plain

remove unused locals

Link: https://lkml.kernel.org/r/ZgQL1WOf9K88nLpQ@MiWiFi-R3L-srv
Signed-off-by: Baoquan He <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
mm/page_alloc.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a4f6b5f308ea..9c591413ca04 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5285,12 +5285,9 @@ static void setup_min_slab_ratio(void);

static void build_zonelists(pg_data_t *pgdat)
{
- int node, local_node;
struct zoneref *zonerefs;
int nr_zones;

- local_node = pgdat->node_id;
-
zonerefs = pgdat->node_zonelists[ZONELIST_FALLBACK]._zonerefs;
nr_zones = build_zonerefs_node(pgdat, zonerefs);
zonerefs += nr_zones;
--
2.41.0


2024-03-28 04:29:28

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the mm tree

Hi all,

On Thu, 28 Mar 2024 09:59:52 +0800 Baoquan He <[email protected]> wrote:
>
> On 03/28/24 at 09:13am, Stephen Rothwell wrote:
> >
> > After merging the mm tree, today's linux-next build (arm
> > multi_v7_defconfig) produced this warning:
> >
> > mm/page_alloc.c: In function 'build_zonelists':
> > mm/page_alloc.c:5324:13: warning: unused variable 'node' [-Wunused-variable]
> > 5324 | int node, local_node;
> > | ^~~~
> >
> > Introduced by commit
> >
> > 95d0185255a3 ("mm/page_alloc.c: remove unneeded codes in !NUMA version of build_zonelists()")
> >
> > from the mm-unstable branch of the mm tree.
>
> Thanks. Below code change has been queued on mm-unstable branch to fix it.

In my i386 defconfig build, this became an error, so I applied your fix patch.

--
Cheers,
Stephen Rothwell


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