[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221102054115.1849736-1-saproj@gmail.com>
Date: Wed, 2 Nov 2022 08:41:15 +0300
From: Sergei Antonov <saproj@...il.com>
To: netdev@...r.kernel.org
Cc: mkubecek@...e.cz, vasundhara-v.volam@...adcom.com,
Sergei Antonov <saproj@...il.com>
Subject: [PATCH ethtool] fix a warning when compiling for 32-bit
Since BNXT_PCIE_STATS_LEN is size_t:
../../ethtool/bnxt.c:66:68: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
66 | fprintf(stdout, "Length is too short, expected 0x%lx\n",
| ~~^
| |
| long unsigned int
| %x
Signed-off-by: Sergei Antonov <saproj@...il.com>
---
bnxt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bnxt.c b/bnxt.c
index b46db726d1c5..2b0ac7646b2b 100644
--- a/bnxt.c
+++ b/bnxt.c
@@ -63,7 +63,7 @@ int bnxt_dump_regs(struct ethtool_drvinfo *info __maybe_unused, struct ethtool_r
return 0;
if (regs->len < (BNXT_PXP_REG_LEN + BNXT_PCIE_STATS_LEN)) {
- fprintf(stdout, "Length is too short, expected 0x%lx\n",
+ fprintf(stdout, "Length is too short, expected 0x%zx\n",
BNXT_PXP_REG_LEN + BNXT_PCIE_STATS_LEN);
return -1;
}
--
2.34.1
Powered by blists - more mailing lists