qla2xxx: Fix the ARM build
Subsystems (2)
PATCH v2 1/1 qla2xxx: Fix the ARM build
This patch fixes the build errors reported by the kernel test robot on June 7th. Does this perhaps mean that so far nobody has tried to use the qla2xxx driver on an ARM system? For the kernel test robot output, see also
https://lore.kernel.org/lkml/202006070558.Cy93XggE%[email protected]/.
--- drivers/scsi/qla2xxx/qla_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_def.h +1 -1
@@ -46,7 +46,7 @@ typedef struct {uint8_t al_pa;uint8_t area;uint8_t domain; -} le_id_t; +}__packed le_id_t;#include "qla_bsg.h" #include "qla_dsd.h"
Quoted 21 lines · Bart Van Assche
This patch fixes the build errors reported by the kernel test robot on June 7th. Does this perhaps mean that so far nobody has tried to use the qla2xxx driver on an ARM system? For the kernel test robot output, see also
https://lore.kernel.org/lkml/202006070558.Cy93XggE%[email protected]/.Cc Nilesh Javali <[email protected]>Cc Quinn Tran <[email protected]>Cc Himanshu Madhani <[email protected]>Cc Hannes Reinecke <[email protected]>Cc Daniel Wagner <[email protected]>Cc Roman Bolshakov <[email protected]>Signed-off-by Bart Van Assche <[email protected]>--- drivers/scsi/qla2xxx/qla_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qla2xxx/qla_def.h +0
-0
drivers/scsi/qla2xxx/qla_def.h typedef struct { · line 52
Quoted 8 lines
drivers/scsi/qla2xxx/qla_def.h +1
-1@@ -46,7 +46,7 @@ typedef struct {uint8_t al_pa;uint8_t area;uint8_t domain; -} le_id_t; +}__packed le_id_t;#include "qla_bsg.h" #include "qla_dsd.h"
BTW, it might worth to mention the bot found the issue:
Thanks,
Roman
Hi Bart,
drivers/scsi/qla2xxx/qla_def.h typedef struct { · line 49
Quoted 10 lines
drivers/scsi/qla2xxx/qla_def.h +1
-1@@ -46,7 +46,7 @@ typedef struct {uint8_t al_pa;uint8_t area;uint8_t domain; -} le_id_t; +}__packed le_id_t;
Now I am totally confused. le_id_t (and why does be_id_t not need it?) are not used inside either of the reported data structure (cmd_entry_t, ms_iocb_entry_t, request_t, struct ctio_crc2_to_fw, struct ctio7_to_24xx, struct ctio_to_2xxx) which the bot reports. I must oversee something.
Besides this, my small test report 3 bytes size for le_id_t on all architectures too. I'll try to see what the compiler generates from the kernel source (takes a while because I am running it natively...)
Quoted 18 lines · Daniel Wagner
Hi Bart,
drivers/scsi/qla2xxx/qla_def.h typedef struct { · line 49
Quoted 10 lines
drivers/scsi/qla2xxx/qla_def.h +1
-1@@ -46,7 +46,7 @@ typedef struct {uint8_t al_pa;uint8_t area;uint8_t domain; -} le_id_t; +}__packed le_id_t;Now I am totally confused.
le_id_t(and why doesbe_id_tnot need it?) are not used inside either of the reported data structure (cmd_entry_t,ms_iocb_entry_t,request_t, structctio_crc2_to_fw, structctio7_to_24xx, structctio_to_2xxx) which the bot reports. I must oversee something.
I also had the thought that both fields should be packed for sake of consistency because there is fcp_hdr with be_id_t sid/did and fcp_hdr_le with le_id_t sid/did. You also seem to be correct, about your concerns. I overlooked that only ctio_crc2_to_fw and ctio7_to_24xx have le_id_t initiator_id field.
Roman
Quoted 17 lines · Roman Bolshakov
Quoted 7 lines · Daniel Wagner
Quoted 7 lines
drivers/scsi/qla2xxx/qla_def.h +0
-0@@ -46,7 +46,7 @@ typedef struct {uint8_t al_pa;uint8_t area;Quoted 8 lines
drivers/scsi/qla2xxx/qla_def.h typedef struct { · line 49
Quoted 3 lines
drivers/scsi/qla2xxx/qla_def.h +1
-1uint8_t domain; -} le_id_t; +}__packed le_id_t;Now I am totally confused.
le_id_t(and why doesbe_id_tnot need it?) are not used inside either of the reported data structure (cmd_entry_t,ms_iocb_entry_t,request_t, structctio_crc2_to_fw, structctio7_to_24xx, structctio_to_2xxx) which the bot reports. I must oversee something.
Quoted 5 lines
I also had the thought that both fields should be packed for sake of consistency because there is
fcp_hdrwithbe_id_tsid/did andfcp_hdr_lewithle_id_tsid/did. You also seem to be correct, about your concerns. I overlooked that onlyctio_crc2_to_fwandctio7_to_24xxhavele_id_tinitiator_idfield.
It's only now that I noticed that the build failures are reported by sparse (C=1). So the build failures may indicate a bug in sparse.
Bart.