From patchwork Fri Jul 15 10:29:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 12919002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E956C43334 for ; Fri, 15 Jul 2022 10:29:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F76E14AA3E; Fri, 15 Jul 2022 10:29:43 +0000 (UTC) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8759714AA2D for ; Fri, 15 Jul 2022 10:29:41 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4LknfQ3Tg5z4xMW; Fri, 15 Jul 2022 20:29:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1657880976; bh=bqpck9qXiLgGXy3pehpjRmLSLJxC7X3rsD323WSFrwE=; h=Date:From:To:Cc:Subject:From; b=iPwlFZL0q5mfku7CxJ6pIAjh7bFVShunhPkIdjJmfIIcrOkV60NDkQ0Q8zFlNh84i mfkxazMyVXNAI/0ndvLf3NDBprpIg6XqtN2GqVVOaG79rrIRbNBpn+IQbdkkf5n5u8 08bQFc4cmQ6g4uvixTWoDOKVwzE7mBcs9dsMAsHl/29tolTQUnTTr61UPUyCQJLscc 2t9ZshcOGotXGIcgR046WAQTm4KCWSAxWTfdJWqdWH1MlQm8a22ZdkW+ZkJ6oIKMLr yu/lOC15DFrR2TiM/lZ2f0jLMU+Wo4X+Lv9leBT893GKy+DdRlFlVSZfSI6nLX6UNc nTfRNemNTUeow== Date: Fri, 15 Jul 2022 20:29:33 +1000 From: Stephen Rothwell To: Yury Norov , Dave Airlie , David Miller Subject: linux-next: build failure after merge of the bitmap tree Message-ID: <20220715202933.661a3c79@canb.auug.org.au> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ratheesh Kannoth , Networking , Linux Kernel Mailing List , DRI , Linux Next Mailing List , Jakub Kicinski Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Date: Fri, 15 Jul 2022 20:20:15 +1000 Subject: [PATCH] fix up for bitmap_weight return value changing Signed-off-by: Stephen Rothwell --- 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 --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; }