summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2025-03-13 16:29:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:25 +0200
commit70ca29ae174cbaaca3a8c5829dc78fad675b016e (patch)
treedccfae5cddb1f68b3d21ebf194589a518bf8cdf1 /drivers
parent3083459852c7f9794b8c156abd9bcd3019c7623d (diff)
downloadlinux-70ca29ae174cbaaca3a8c5829dc78fad675b016e.tar.gz
linux-70ca29ae174cbaaca3a8c5829dc78fad675b016e.tar.bz2
linux-70ca29ae174cbaaca3a8c5829dc78fad675b016e.zip
crypto: tegra - Fix format specifier in tegra_sha_prep_cmd()
[ Upstream commit 795e5bdb0ada2c77ea28611d88f1d5d7ca9b2f4d ] When building for 32-bit targets, for which ssize_t is 'int' instead of 'long', there is a warning due to an incorrect format specifier: In file included from include/linux/printk.h:610, from include/linux/kernel.h:31, from include/linux/clk.h:13, from drivers/crypto/tegra/tegra-se-hash.c:7: drivers/crypto/tegra/tegra-se-hash.c: In function 'tegra_sha_prep_cmd': drivers/crypto/tegra/tegra-se-hash.c:343:26: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'ssize_t' {aka 'int'} [-Werror=format=] 343 | dev_dbg(se->dev, "msg len %llu msg left %llu sz %lu cfg %#x", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... drivers/crypto/tegra/tegra-se-hash.c:343:59: note: format string is defined here 343 | dev_dbg(se->dev, "msg len %llu msg left %llu sz %lu cfg %#x", | ~~^ | | | long unsigned int | %u cc1: all warnings being treated as errors Use '%zd', the proper specifier for ssize_t, to resolve the warning. Fixes: ff4b7df0b511 ("crypto: tegra - Fix HASH intermediate result handling") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/tegra/tegra-se-hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/tegra/tegra-se-hash.c b/drivers/crypto/tegra/tegra-se-hash.c
index 65a50f29bd7e..42d007b7af45 100644
--- a/drivers/crypto/tegra/tegra-se-hash.c
+++ b/drivers/crypto/tegra/tegra-se-hash.c
@@ -340,7 +340,7 @@ static int tegra_sha_prep_cmd(struct tegra_sha_ctx *ctx, u32 *cpuvaddr,
cpuvaddr[i++] = host1x_uclass_incr_syncpt_cond_f(1) |
host1x_uclass_incr_syncpt_indx_f(se->syncpt_id);
- dev_dbg(se->dev, "msg len %llu msg left %llu sz %lu cfg %#x",
+ dev_dbg(se->dev, "msg len %llu msg left %llu sz %zd cfg %#x",
msg_len, msg_left, rctx->datbuf.size, rctx->config);
return i;