diff mbox series

linux-next: build failure after merge of the bitmap tree

Message ID 20220715202933.661a3c79@canb.auug.org.au (mailing list archive)
State New, archived
Headers show
Series linux-next: build failure after merge of the bitmap tree | expand

Commit Message

Stephen Rothwell July 15, 2022, 10:29 a.m. UTC
Hi all,

After merging the bitmap tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/gpu/drm/i915/gt/intel_sseu.c: In function 'intel_sseu_print_ss_info':
drivers/gpu/drm/i915/gt/intel_sseu.c:868:52: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  868 |                 seq_printf(m, "  %s Geometry DSS: %u\n", type,
      |                                                   ~^
      |                                                    |
      |                                                    unsigned int
      |                                                   %lu
  869 |                            bitmap_weight(sseu->geometry_subslice_mask.xehp,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            long unsigned int
  870 |                                          XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_sseu.c:871:51: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  871 |                 seq_printf(m, "  %s Compute DSS: %u\n", type,
      |                                                  ~^
      |                                                   |
      |                                                   unsigned int
      |                                                  %lu
  872 |                            bitmap_weight(sseu->compute_subslice_mask.xehp,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            long unsigned int
  873 |                                          XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
In file included from include/linux/printk.h:573,
                 from include/linux/kernel.h:29,
                 from arch/x86/include/asm/percpu.h:27,
                 from arch/x86/include/asm/nospec-branch.h:14,
                 from arch/x86/include/asm/paravirt_types.h:40,
                 from arch/x86/include/asm/ptrace.h:97,
                 from arch/x86/include/asm/math_emu.h:5,
                 from arch/x86/include/asm/processor.h:13,
                 from arch/x86/include/asm/timex.h:5,
                 from include/linux/timex.h:67,
                 from include/linux/time32.h:13,
                 from include/linux/time.h:60,
                 from include/linux/stat.h:19,
                 from include/linux/module.h:13,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:9:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_mem_table_entry':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:27: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Werror=format=]
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:9: note: in expansion of macro 'dev_dbg'
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |         ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:69: note: format string is defined here
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |                                                                    ~^
      |                                                                     |
      |                                                                     unsigned int
      |                                                                    %lu
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:10:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_id':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:35: error: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
  144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                        ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:17: note: in expansion of macro 'dev_err'
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                 ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:64: note: format string is defined here
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                                                               ~^
      |                                                                |
      |                                                                int
      |                                                               %ld
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:10:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_cam_table_entry':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:36: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
  150 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                          ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:17: note: in expansion of macro 'dev_info'
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                 ^~~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:78: note: format string is defined here
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                                                                             ~^
      |                                                                              |
      |                                                                              unsigned int
      |                                                                             %lu
cc1: all warnings being treated as errors

Caused by commit

  31563fb891aa ("lib/bitmap: change type of bitmap_weight to unsigned long")

interacting with commits

  b87d39019651 ("drm/i915/sseu: Disassociate internal subslice mask representation from uapi")

from the drm tree and

  b747923afff8 ("octeontx2-af: Exact match support")

from the net-next tree.

I have applied the following merge resolution patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 15 Jul 2022 20:20:15 +1000
Subject: [PATCH] fix up for bitmap_weight return value changing

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/gt/intel_sseu.c                     | 4 ++--
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c
index c6d3050604c8..79fa564785b6 100644
--- a/drivers/gpu/drm/i915/gt/intel_sseu.c
+++ b/drivers/gpu/drm/i915/gt/intel_sseu.c
@@ -865,10 +865,10 @@  void intel_sseu_print_ss_info(const char *type,
 	int s;
 
 	if (sseu->has_xehp_dss) {
-		seq_printf(m, "  %s Geometry DSS: %u\n", type,
+		seq_printf(m, "  %s Geometry DSS: %lu\n", type,
 			   bitmap_weight(sseu->geometry_subslice_mask.xehp,
 					 XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));
-		seq_printf(m, "  %s Compute DSS: %u\n", type,
+		seq_printf(m, "  %s Compute DSS: %lu\n", type,
 			   bitmap_weight(sseu->compute_subslice_mask.xehp,
 					 XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));
 	} else {
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
index 1195b690f483..2f4ce41df83c 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
@@ -451,7 +451,7 @@  static int rvu_npc_exact_alloc_mem_table_entry(struct rvu *rvu, u8 *way,
 	}
 	mutex_unlock(&table->lock);
 
-	dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
+	dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%lu\n", __func__,
 		bitmap_weight(table->mem_table.bmap, table->mem_table.depth));
 	return -ENOSPC;
 }
@@ -489,7 +489,7 @@  static bool rvu_npc_exact_alloc_id(struct rvu *rvu, u32 *seq_id)
 	idx = find_first_zero_bit(table->id_bmap, table->tot_ids);
 	if (idx == table->tot_ids) {
 		mutex_unlock(&table->lock);
-		dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
+		dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
 			__func__, bitmap_weight(table->id_bmap, table->tot_ids));
 
 		return false;
@@ -522,7 +522,7 @@  static int rvu_npc_exact_alloc_cam_table_entry(struct rvu *rvu, int *index)
 	idx = find_first_zero_bit(table->cam_table.bmap, table->cam_table.depth);
 	if (idx == table->cam_table.depth) {
 		mutex_unlock(&table->lock);
-		dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
+		dev_info(rvu->dev, "%s: No space in exact cam table, weight=%lu\n", __func__,
 			 bitmap_weight(table->cam_table.bmap, table->cam_table.depth));
 		return -ENOSPC;
 	}