drivers/nvme: fix pr_warn format string
Subsystems (3)
PATCH 1/1 drivers/nvme: fix pr_warn format string
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 <[email protected]>
--- drivers/nvme/target/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/auth.c +1 -1
@@ -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 {
Signature · 1 line
2.30.2
Christoph Hellwig
maintainerThis was already fixed by:
commit d6f7cd209b089553ce0217eb0091f5f5fdc654ba
Author: Christoph Hellwig <[email protected]> Date: Mon Jul 18 07:02:29 2022 +0200
nvmet: fix a format specifier in nvmet_auth_ctrl_exponential