* [PATCH] scsi: mpi3mr: Fix a format specifier
@ 2024-05-29 20:52 Bart Van Assche
2024-05-29 22:53 ` Damien Le Moal
2024-05-30 7:24 ` John Garry
0 siblings, 2 replies; 4+ messages in thread
From: Bart Van Assche @ 2024-05-29 20:52 UTC (permalink / raw)
To: Martin K . Petersen
Cc: linux-scsi, Bart Van Assche, Tomas Henzl,
Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena,
Sreekanth Reddy, James E.J. Bottomley
Fix the following compiler warning when building a 32-bit kernel:
./include/linux/kern_levels.h:5:25: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
drivers/scsi/mpi3mr/mpi3mr_transport.c:1367:25: note: in expansion of macro ‘ioc_warn’
1367 | ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",
| ^~~~~~~~
Cc: Tomas Henzl <thenzl@redhat.com>
Cc: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
Fixes: 3668651def2c ("scsi: mpi3mr: Sanitise num_phys")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
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;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: mpi3mr: Fix a format specifier
2024-05-29 20:52 [PATCH] scsi: mpi3mr: Fix a format specifier Bart Van Assche
@ 2024-05-29 22:53 ` Damien Le Moal
2024-05-30 7:24 ` John Garry
1 sibling, 0 replies; 4+ messages in thread
From: Damien Le Moal @ 2024-05-29 22:53 UTC (permalink / raw)
To: Bart Van Assche, Martin K . Petersen
Cc: linux-scsi, Tomas Henzl, Sathya Prakash Veerichetty,
Kashyap Desai, Sumit Saxena, Sreekanth Reddy,
James E.J. Bottomley
On 5/30/24 05:52, Bart Van Assche wrote:
> Fix the following compiler warning when building a 32-bit kernel:
>
> ./include/linux/kern_levels.h:5:25: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
> drivers/scsi/mpi3mr/mpi3mr_transport.c:1367:25: note: in expansion of macro ‘ioc_warn’
> 1367 | ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",
> | ^~~~~~~~
>
> Cc: Tomas Henzl <thenzl@redhat.com>
> Cc: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
> Fixes: 3668651def2c ("scsi: mpi3mr: Sanitise num_phys")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Looks OK to me.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: mpi3mr: Fix a format specifier
2024-05-29 20:52 [PATCH] scsi: mpi3mr: Fix a format specifier Bart Van Assche
2024-05-29 22:53 ` Damien Le Moal
@ 2024-05-30 7:24 ` John Garry
2024-05-30 18:59 ` Bart Van Assche
1 sibling, 1 reply; 4+ messages in thread
From: John Garry @ 2024-05-30 7:24 UTC (permalink / raw)
To: Bart Van Assche, Martin K . Petersen
Cc: linux-scsi, Tomas Henzl, Sathya Prakash Veerichetty,
Kashyap Desai, Sumit Saxena, Sreekanth Reddy,
James E.J. Bottomley
On 29/05/2024 21:52, Bart Van Assche wrote:
> Fix the following compiler warning when building a 32-bit kernel:
>
> ./include/linux/kern_levels.h:5:25: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
> drivers/scsi/mpi3mr/mpi3mr_transport.c:1367:25: note: in expansion of macro ‘ioc_warn’
> 1367 | ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",
see
https://lore.kernel.org/linux-scsi/20240514-mpi3mr-fix-wformat-v1-1-f1ad49217e5e@kernel.org/
from two weeks ago.
> | ^~~~~~~~
>
> Cc: Tomas Henzl <thenzl@redhat.com>
> Cc: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
> Fixes: 3668651def2c ("scsi: mpi3mr: Sanitise num_phys")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> 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;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: mpi3mr: Fix a format specifier
2024-05-30 7:24 ` John Garry
@ 2024-05-30 18:59 ` Bart Van Assche
0 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2024-05-30 18:59 UTC (permalink / raw)
To: John Garry, Martin K . Petersen
Cc: linux-scsi, Tomas Henzl, Sathya Prakash Veerichetty,
Kashyap Desai, Sumit Saxena, Sreekanth Reddy,
James E.J. Bottomley
On 5/30/24 00:24, John Garry wrote:
> On 29/05/2024 21:52, Bart Van Assche wrote:
>> Fix the following compiler warning when building a 32-bit kernel:
>>
>> ./include/linux/kern_levels.h:5:25: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
>> drivers/scsi/mpi3mr/mpi3mr_transport.c:1367:25: note: in expansion of macro ‘ioc_warn’
>> 1367 | ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",
>
> see https://lore.kernel.org/linux-scsi/20240514-mpi3mr-fix-wformat-v1-1-f1ad49217e5e@kernel.org/ from two weeks ago.
Interesting to see that this patch has been posted before. I had not yet noticed
Nathan's patch - I only checked the master branch and Martin's for-next branch
before I posted this patch.
Bart.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-30 18:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 20:52 [PATCH] scsi: mpi3mr: Fix a format specifier Bart Van Assche
2024-05-29 22:53 ` Damien Le Moal
2024-05-30 7:24 ` John Garry
2024-05-30 18:59 ` Bart Van Assche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox