scsi: isci: Avoid -Wflex-array-member-not-at-end warning
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Move the conflicting declaration (which happens to be in a union, so we're moving the entire union) to the end of the corresponding structure. Notice that `struct ssp_response_iu` is a flexible structure, this is a structure that contains a flexible-array member. With these changes fix the following warning: drivers/scsi/isci/task.h:92:11: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://patch.msgid.link/aM09bpl1xj9KZSZl@kspp Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
3a86608788
commit
11956e4b91
@@ -85,15 +85,17 @@ struct isci_tmf {
|
|||||||
|
|
||||||
struct completion *complete;
|
struct completion *complete;
|
||||||
enum sas_protocol proto;
|
enum sas_protocol proto;
|
||||||
|
unsigned char lun[8];
|
||||||
|
u16 io_tag;
|
||||||
|
enum isci_tmf_function_codes tmf_code;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
/* Must be last --ends in a flexible-array member. */
|
||||||
union {
|
union {
|
||||||
struct ssp_response_iu resp_iu;
|
struct ssp_response_iu resp_iu;
|
||||||
struct dev_to_host_fis d2h_fis;
|
struct dev_to_host_fis d2h_fis;
|
||||||
u8 rsp_buf[SSP_RESP_IU_MAX_SIZE];
|
u8 rsp_buf[SSP_RESP_IU_MAX_SIZE];
|
||||||
} resp;
|
} resp;
|
||||||
unsigned char lun[8];
|
|
||||||
u16 io_tag;
|
|
||||||
enum isci_tmf_function_codes tmf_code;
|
|
||||||
int status;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void isci_print_tmf(struct isci_host *ihost, struct isci_tmf *tmf)
|
static inline void isci_print_tmf(struct isci_host *ihost, struct isci_tmf *tmf)
|
||||||
|
|||||||
Reference in New Issue
Block a user