From: Arnd Bergmann <arnd@kernel.org>
To: Akhil R <akhilrajeev@nvidia.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Chen Ridong <chenridong@huawei.com>,
linux-crypto@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] crypto: tegra: fix size_t format string
Date: Fri, 14 Mar 2025 16:59:59 +0100 [thread overview]
Message-ID: <20250314160006.346042-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
Printing size_t as %lu causes a warning when it is defined as 'unsigned int':
drivers/crypto/tegra/tegra-se-hash.c:344:22: error: format specifies type 'unsigned long' but the argument has type 'ssize_t' (aka 'int') [-Werror,-Wformat]
343 | dev_dbg(se->dev, "msg len %llu msg left %llu sz %lu cfg %#x",
| ~~~
| %zd
Use %zu as the proper format string.
Fixes: ff4b7df0b511 ("crypto: tegra - Fix HASH intermediate result handling")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/crypto/tegra/tegra-se-hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/tegra/tegra-se-hash.c b/drivers/crypto/tegra/tegra-se-hash.c
index 65a50f29bd7e..ed86235fe518 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 %zu cfg %#x",
msg_len, msg_left, rctx->datbuf.size, rctx->config);
return i;
--
2.39.5
next reply other threads:[~2025-03-14 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 15:59 Arnd Bergmann [this message]
2025-03-21 11:05 ` [PATCH] crypto: tegra: fix size_t format string Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250314160006.346042-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=akhilrajeev@nvidia.com \
--cc=arnd@arndb.de \
--cc=chenridong@huawei.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jonathanh@nvidia.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox