public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] scsi: mpi3mr: Fix printf() specifier
@ 2024-06-02 14:04 Andy Shevchenko
  2024-06-02 15:36 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-06-02 14:04 UTC (permalink / raw)
  To: mpi3mr-linuxdrv.pdl, linux-scsi, linux-kernel
  Cc: Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena,
	Sreekanth Reddy, James E.J. Bottomley, Martin K. Petersen,
	Andy Shevchenko

Compiler is not happy about format string

  format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
  note: in expansion of macro ‘ioc_warn’
  1367 |       ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",

Fix the specifier to make it possible to build.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/scsi/mpi3mr/mpi3mr_transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c
index 329cc6ec3b58..82aa4e418c5a 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c
@@ -1364,7 +1364,7 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
 			continue;
 
 		if (i > sizeof(mr_sas_port->phy_mask) * 8) {
-			ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",
+			ioc_warn(mrioc, "skipping port %u, max allowed value is %zu\n",
 			    i, sizeof(mr_sas_port->phy_mask) * 8);
 			goto out_fail;
 		}
-- 
2.43.0.rc1.1336.g36b5255a03ac


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] scsi: mpi3mr: Fix printf() specifier
  2024-06-02 14:04 [PATCH v1 1/1] scsi: mpi3mr: Fix printf() specifier Andy Shevchenko
@ 2024-06-02 15:36 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2024-06-02 15:36 UTC (permalink / raw)
  To: mpi3mr-linuxdrv.pdl, linux-scsi, linux-kernel
  Cc: Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena,
	Sreekanth Reddy, James E.J. Bottomley, Martin K. Petersen

On Sun, Jun 02, 2024 at 05:04:20PM +0300, Andy Shevchenko wrote:
> Compiler is not happy about format string
> 
>   format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
>   note: in expansion of macro ‘ioc_warn’
>   1367 |       ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",
> 
> Fix the specifier to make it possible to build.

Already fixed by 9f365cb8bbd0 ("scsi: mpi3mr: Use proper format specifier in
mpi3mr_sas_port_add()").

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-02 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-02 14:04 [PATCH v1 1/1] scsi: mpi3mr: Fix printf() specifier Andy Shevchenko
2024-06-02 15:36 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox