Skip to content

Commit 9adef65

Browse files
committed
crypto: tegra - Fix format specifier in tegra_sha_prep_cmd()
jira LE-4159 Rebuild_History Non-Buildable kernel-5.14.0-570.41.1.el9_6 commit-author Nathan Chancellor <[email protected]> commit 795e5bd 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: ff4b7df ("crypto: tegra - Fix HASH intermediate result handling") Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Herbert Xu <[email protected]> (cherry picked from commit 795e5bd) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 3f68552 commit 9adef65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/crypto/tegra/tegra-se-hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static int tegra_sha_prep_cmd(struct tegra_sha_ctx *ctx, u32 *cpuvaddr,
340340
cpuvaddr[i++] = host1x_uclass_incr_syncpt_cond_f(1) |
341341
host1x_uclass_incr_syncpt_indx_f(se->syncpt_id);
342342

343-
dev_dbg(se->dev, "msg len %llu msg left %llu sz %lu cfg %#x",
343+
dev_dbg(se->dev, "msg len %llu msg left %llu sz %zd cfg %#x",
344344
msg_len, msg_left, rctx->datbuf.size, rctx->config);
345345

346346
return i;

0 commit comments

Comments
 (0)