Re: [PATCH] mpi3mr: fix printk() format strings

From: Martin K. Petersen
Date: Mon Dec 18 2023 - 21:19:33 EST


On Thu, 07 Dec 2023 15:28:06 +0100, Arnd Bergmann wrote:

> The newly introduced error messages get multiple format strings wrong: size_t must
> be printed using the %z modifier rather than %l and dma_addr_t must be printed
> by reference using the special %pad pointer type:
>
> drivers/scsi/mpi3mr/mpi3mr_app.c: In function 'mpi3mr_build_nvme_prp':
> include/linux/kern_levels.h:5:25: error: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=]
> drivers/scsi/mpi3mr/mpi3mr_app.c:949:25: note: in expansion of macro 'dprint_bsg_err'
> 949 | dprint_bsg_err(mrioc,
> | ^~~~~~~~~~~~~~
> include/linux/kern_levels.h:5:25: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
> drivers/scsi/mpi3mr/mpi3mr_app.c:1112:41: note: in expansion of macro 'dprint_bsg_err'
> 1112 | dprint_bsg_err(mrioc,
> | ^~~~~~~~~~~~~~
>
> [...]

Applied to 6.8/scsi-queue, thanks!

[1/1] mpi3mr: fix printk() format strings
https://git.kernel.org/mkp/scsi/c/fc1fbd13a205

--
Martin K. Petersen Oracle Linux Engineering