[PATCH] scsi: pm8001: Use int instead of u32 to store error codes

Qianfeng Rong posted 1 patch 1 month, 1 week ago
drivers/scsi/pm8001/pm8001_ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] scsi: pm8001: Use int instead of u32 to store error codes
Posted by Qianfeng Rong 1 month, 1 week ago
Use int instead of u32 for 'ret' variable to store negative error codes
returned by PM8001_CHIP_DISP->set_nvmd_req().

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
 drivers/scsi/pm8001/pm8001_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c
index 7618f9cc9986..6e76b1cae220 100644
--- a/drivers/scsi/pm8001/pm8001_ctl.c
+++ b/drivers/scsi/pm8001/pm8001_ctl.c
@@ -680,7 +680,7 @@ static int pm8001_set_nvmd(struct pm8001_hba_info *pm8001_ha)
 	struct pm8001_ioctl_payload	*payload;
 	DECLARE_COMPLETION_ONSTACK(completion);
 	u8		*ioctlbuffer;
-	u32		ret;
+	int		ret;
 	u32		length = 1024 * 5 + sizeof(*payload) - 1;
 
 	if (pm8001_ha->fw_image->size > 4096) {
-- 
2.34.1
Re: [PATCH] scsi: pm8001: Use int instead of u32 to store error codes
Posted by Martin K. Petersen 3 weeks, 2 days ago
On Tue, 26 Aug 2025 17:32:42 +0800, Qianfeng Rong wrote:

> Use int instead of u32 for 'ret' variable to store negative error codes
> returned by PM8001_CHIP_DISP->set_nvmd_req().
> 
> 

Applied to 6.18/scsi-queue, thanks!

[1/1] scsi: pm8001: Use int instead of u32 to store error codes
      https://git.kernel.org/mkp/scsi/c/bee3554d1a4e

-- 
Martin K. Petersen
Re: [PATCH] scsi: pm8001: Use int instead of u32 to store error codes
Posted by Martin K. Petersen 1 month ago
Qianfeng,

> Use int instead of u32 for 'ret' variable to store negative error codes
> returned by PM8001_CHIP_DISP->set_nvmd_req().

Applied to 6.18/scsi-staging, thanks!

-- 
Martin K. Petersen