linux-next: build failure after merge of the mm tree
Subsystems (2)
Hi all,
After merging the mm tree, today's linux-next build (native powerpc perf) failed like this:
In file included from arch/powerpc/util/../../../util/pmu.h:5,
from arch/powerpc/util/pmu.c:5:tools/include/linux/bitmap.h: In function 'bitmap_alloc':tools/include/linux/bitmap.h:83:69: error: unused parameter 'flags' [-Werror=unused-parameter]
83 | static inline unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags)
| ~~~~~~^~~~~
cc1: all warnings being treated as errors
Caused by commit
351b9e493b09 ("lib/interval_tree: add test case for interval_tree_iter_xxx() helpers")
I have applied the following hack for today.
From: Stephen Rothwell <[email protected]>
Date: Wed, 12 Mar 2025 11:03:37 +1100
Subject: [PATCH] hack for "lib/interval_tree: add test case for
interval_tree_iter_xxx() helpers"
--- tools/include/linux/bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/include/linux/bitmap.h +1 -1
@@ -80,7 +80,7 @@ static inline void bitmap_or(unsigned long *dst, const unsigned long *src1,__bitmap_or (dst, src1, src2, nbits); } -static inline unsigned long *bitmap_alloc (unsigned int nbits,gfp_t flags) +static inline unsigned long *bitmap_alloc (unsigned int nbits,gfp_t flags__maybe_unused ) {return malloc (bitmap_size (nbits)); }
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Quoted 34 lines · Stephen Rothwell
Hi all,
After merging the mm tree, today's linux-next build (native powerpc perf) failed like this:
In file included from
arch/powerpc/util/../../../util/pmu.h:5,
fromarch/powerpc/util/pmu.c:5:tools/include/linux/bitmap.h: In function 'bitmap_alloc':tools/include/linux/bitmap.h:83:69: error: unused parameter 'flags' [-Werror=unused-parameter]
83 | static inline unsigned long *bitmap_alloc(unsigned int nbits,gfp_tflags)
| ~~~~~~^~~~~
cc1: all warnings being treated as errorsCaused by commit
351b9e493b09("lib/interval_tree: add test case forinterval_tree_iter_xxx()helpers")I have applied the following hack for today.
From: Stephen Rothwell <[email protected]>
Date: Wed, 12 Mar 2025 11:03:37 +1100
Subject: [PATCH] hack for "lib/interval_tree: add test case forinterval_tree_iter_xxx()helpers"Signed-off-by Stephen Rothwell <[email protected]>---
tools/include/linux/bitmap.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)tools/include/linux/bitmap.h +0
-0
tools/include/linux/bitmap.h static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, · line 86
Quoted 8 lines
tools/include/linux/bitmap.h +1
-1@@ -80,7 +80,7 @@ static inline void bitmap_or(unsigned long *dst, const unsigned long *src1,__bitmap_or (dst, src1, src2, nbits); } -static inline unsigned long *bitmap_alloc (unsigned int nbits,gfp_t flags) +static inline unsigned long *bitmap_alloc (unsigned int nbits,gfp_t flags__maybe_unused ) {return malloc (bitmap_size (nbits)); }
Hi, Stephen
Thanks for your fix. It looks good to me.
If it is ok to you, I would like to merge this into the original commit.
Quoted 6 lines
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Signature · 2 lines
Wei Yang Help you, Help me
Hi Wei,
Quoted 4 lines · On Wed, 12 Mar 2025 02:14:20 +0000 Wei Yang <[email protected]> wrote:
Thanks for your fix. It looks good to me.
If it is ok to you, I would like to merge this into the original commit.
Fine by me.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 10 lines · Stephen Rothwell
Hi Wei,
Quoted 4 lines · On Wed, 12 Mar 2025 02:14:20 +0000 Wei Yang <[email protected]> wrote:
Thanks for your fix. It looks good to me.
If it is ok to you, I would like to merge this into the original commit.
Fine by me.
Thanks
Andrew
Would you mind merging it or prefer me to send a new version?
Quoted 3 lines
Signature · 2 lines
Cheers, Stephen Rothwell
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 10 lines · On Wed, 12 Mar 2025 11:36:12 +1100 Stephen Rothwell <[email protected]>…
After merging the mm tree, today's linux-next build (native powerpc perf) failed like this:
In file included from
arch/powerpc/util/../../../util/pmu.h:5,
fromarch/powerpc/util/pmu.c:5:tools/include/linux/bitmap.h: In function 'bitmap_alloc':tools/include/linux/bitmap.h:83:69: error: unused parameter 'flags' [-Werror=unused-parameter]
83 | static inline unsigned long *bitmap_alloc(unsigned int nbits,gfp_tflags)
| ~~~~~~^~~~~
cc1: all warnings being treated as errors
Maybe we should turn off -Wno-unused-parameter for tools/. The rest of the kernel extensively expects that unused parameters to inlined functions are acceptable, for stuff like this:
#else /* CONFIG_SWAP */
static inline struct swap_info_struct *swp_swap_info(swp_entry_t entry)
{
return NULL;
}static inline struct swap_info_struct *get_swap_device(swp_entry_t entry)
{
return NULL;
}static inline void put_swap_device(struct swap_info_struct *si) {
}
so why do we make tools/ different?