[PATCH] drivers/nvme: fix pr_warn format string
Max Filippov
jcmvbkbc at gmail.com
Mon Jul 25 12:17:51 PDT 2022
Use %zu format instead of %lu to print variable of size_t type.
This fixes the following gcc build error on 32-bit targets:
error: format '%lu' expects argument of type 'long unsigned int',
but argument 3 has type 'size_t' {aka 'unsigned int'}
Fixes: 71ebe3842ebe ("nvmet-auth: Diffie-Hellman key exchange support")
Signed-off-by: Max Filippov <jcmvbkbc at gmail.com>
---
drivers/nvme/target/auth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/auth.c b/drivers/nvme/target/auth.c
index bf92435c783c..716a10ca91d1 100644
--- a/drivers/nvme/target/auth.c
+++ b/drivers/nvme/target/auth.c
@@ -488,7 +488,7 @@ int nvmet_auth_ctrl_exponential(struct nvmet_req *req,
return -ENOKEY;
}
if (buf_size != ctrl->dh_keysize) {
- pr_warn("ctrl %d DH public key size mismatch, need %lu is %d\n",
+ pr_warn("ctrl %d DH public key size mismatch, need %zu is %d\n",
ctrl->cntlid, ctrl->dh_keysize, buf_size);
ret = -EINVAL;
} else {
--
2.30.2
More information about the Linux-nvme
mailing list