scsi: qla1280: Fix a use of QLA_64BIT_PTR
Subsystems (2)
PATCH 1/1 scsi: qla1280: Fix a use of QLA_64BIT_PTR
Clang warns:
../drivers/scsi/qla1280.c:1702:5: warning: 'QLA_64BIT_PTR' is not defined, evaluates to 0 [-Wundef]
if QLA_64BIT_PTR
^
1 warning generated.
The rest of this driver uses #ifdef QLA_64BIT_PTR, do the same thing at this site to remove this warning.
--- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla1280.c +1 -1
@@ -1699,7 +1699,7 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha)return err; } -#if QLA_64BIT_PTR +#ifdef QLA_64BIT_PTR #define LOAD_CMD MBC_LOAD_RAM_A64_ROM#define DUMP_CMD MBC_DUMP_RAM_A64_ROM#define CMD_ARGS (BIT_7 | BIT_6 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0)
Signature · 1 line
2.25.0
Quoted 6 lines · Nathan Chancellor
Clang warns:
../drivers/scsi/qla1280.c:1702:5: warning: 'QLA_64BIT_PTR' is not defined, evaluates to 0 [-Wundef]
ifQLA_64BIT_PTR
Quoted 7 lines
^1 warning generated.
The rest of this driver uses #ifdef
QLA_64BIT_PTR, do the same thing at this site to remove this warning.Fixes ba304e5b4498 ("scsi: qla1280: Fix dma firmware download, if dma address is 64bit")
^ The above SHA is valid only in linux-next. Won't it change when merged into mainline?
Quoted 2 lines
Thanks for the patch.
Quoted 9 lines
--- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qla1280.c +0
-0
drivers/scsi/qla1280.c qla1280_load_firmware_pio(struct scsi_qla_host *ha) · line 1702
Quoted 5 lines
drivers/scsi/qla1280.c +1
-1@@ -1699,7 +1699,7 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha)return err; } -#if QLA_64BIT_PTR +#ifdef QLA_64BIT_PTR
Thomas should test this, as it implies the previous patch was NEVER using the "true case" values, making it in effect a no-functional-change (NFC).
Quoted 4 lines
drivers/scsi/qla1280.c +0
-1#define LOAD_CMD MBC_LOAD_RAM_A64_ROM#define DUMP_CMD MBC_DUMP_RAM_A64_ROM#define CMD_ARGS (BIT_7 | BIT_6 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0) --
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 11 lines · Nick Desaulniers
Quoted 9 lines · Nathan Chancellor
Clang warns:
../drivers/scsi/qla1280.c:1702:5: warning: 'QLA_64BIT_PTR' is not defined, evaluates to 0 [-Wundef]
ifQLA_64BIT_PTR^1 warning generated.
Quoted 7 lines
Quoted 4 lines
The rest of this driver uses #ifdef
QLA_64BIT_PTR, do the same thing at this site to remove this warning.Fixes ba304e5b4498 ("scsi: qla1280: Fix dma firmware download, if dma address is 64bit")^ The above SHA is valid only in linux-next. Won't it change when merged into mainline?
Not unless Martin rebases his tree (in which case, this patch should just be folded into the original one).
Quoted 5 lines
Quoted 2 lines
Thanks for the patch.
Reviewed-by Nick Desaulniers <[email protected]>
Thanks for the review :)
Quoted 12 lines
Quoted 12 lines
--- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qla1280.c +0
-0@@ -1699,7 +1699,7 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha)return err; }
Quoted 6 lines
drivers/scsi/qla1280.c qla1280_load_firmware_pio(struct scsi_qla_host *ha) · line 1702
Quoted 2 lines
drivers/scsi/qla1280.c +1
-1-#if QLA_64BIT_PTR +#ifdef QLA_64BIT_PTR Thomas should test this, as it implies the previous patch was NEVER using the "true case" values, making it in effect a no-functional-change (NFC).
QLA_64BIT_PTR is defined to 1 when CONFIG_ARCH_DMA_ADDR_T_64BIT is set so the true should have always worked, unless I am misunderstanding what you are saying. The false case should have also worked because it is still evaluated to 0 but it throws the warning to make sure that was intended (again, as I understand it).
Quoted 7 lines
Quoted 4 lines
drivers/scsi/qla1280.c +0
-1#define LOAD_CMD MBC_LOAD_RAM_A64_ROM#define DUMP_CMD MBC_DUMP_RAM_A64_ROM#define CMD_ARGS (BIT_7 | BIT_6 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0) --Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 11 lines · Nathan Chancellor
Quoted 8 lines · Nick Desaulniers
drivers/scsi/qla1280.c qla1280_load_firmware_pio(struct scsi_qla_host *ha) · line 1702
Quoted 2 lines · Nathan Chancellor
drivers/scsi/qla1280.c +1
-1-#if QLA_64BIT_PTR +#ifdef QLA_64BIT_PTR Thomas should test this, as it implies the previous patch was NEVER using the "true case" values, making it in effect a no-functional-change (NFC).
Quoted 9 lines
QLA_64BIT_PTRis defined to 1 whenCONFIG_ARCH_DMA_ADDR_T_64BITis set so the true should have always worked, unless I am misunderstanding what you are saying. The false case should have also worked because it is still evaluated to 0 but it throws the warning to make sure that was intended (again, as I understand it).Quoted 3 lines
Quoted 3 lines
#define LOAD_CMD MBC_LOAD_RAM_A64_ROM #define DUMP_CMD MBC_DUMP_RAM_A64_ROM #define CMD_ARGS (BIT_7 | BIT_6 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0)
Ah, right, so either QLA_64BIT_PTR is defined with a value of 1, or not defined at all. My bad.
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 6 lines
Quoted 6 lines
../drivers/scsi/qla1280.c:1702:5: warning: 'QLA_64BIT_PTR' is not defined, evaluates to 0 [-Wundef]
ifQLA_64BIT_PTR^1 warning generated.
I already merged Thomas' patch for this issue.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering