summaryrefslogtreecommitdiff
path: root/drivers/scsi/3w-9xxx.h
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2021-04-28 02:59:13 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-05-16 01:01:33 +0300
commit44c5027bb5c8bbdc2aea2141dc32fe72c3f3988a (patch)
tree97cacee68418fb40a2b651470f43b2a5175d29f6 /drivers/scsi/3w-9xxx.h
parent0edca4fc633ce223753c217f135a8036f516357b (diff)
downloadlinux-44c5027bb5c8bbdc2aea2141dc32fe72c3f3988a.tar.xz
scsi: 3w-9xxx: Use flexible array members to avoid struct padding
In preparation for removing the "#pragma pack(1)" from the driver, fix all instances where a trailing array member could be replaced by a flexible array member. Since a flexible array member has zero size, it introduces no padding, whether or not the struct is packed. Link: https://lore.kernel.org/r/20210427235915.39211-2-samuel@sholland.org Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/3w-9xxx.h')
-rw-r--r--drivers/scsi/3w-9xxx.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/3w-9xxx.h b/drivers/scsi/3w-9xxx.h
index 30109ae96ce5..23b312a53eaf 100644
--- a/drivers/scsi/3w-9xxx.h
+++ b/drivers/scsi/3w-9xxx.h
@@ -602,7 +602,7 @@ typedef struct TAG_TW_Ioctl_Apache {
TW_Ioctl_Driver_Command driver_command;
char padding[488];
TW_Command_Full firmware_command;
- char data_buffer[1];
+ char data_buffer[];
} TW_Ioctl_Buf_Apache;
/* Lock structure for ioctl get/release lock */
@@ -618,7 +618,7 @@ typedef struct {
unsigned short parameter_id;
unsigned short parameter_size_bytes;
unsigned short actual_parameter_size_bytes;
- unsigned char data[1];
+ unsigned char data[];
} TW_Param_Apache, *PTW_Param_Apache;
/* Response queue */