aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2025-05-05 08:06:37 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2025-05-12 22:16:10 -0400
commitcd6856d38881f8137d795b64ff5587c0232a0c34 (patch)
treeb0229641e32230c52a813beda4a1f8350100cbcc /include/scsi
parentscsi: docs: Clean up some style in scsi_mid_low_api (diff)
downloadlinux-cd6856d38881f8137d795b64ff5587c0232a0c34.tar.gz
linux-cd6856d38881f8137d795b64ff5587c0232a0c34.zip
scsi: sd: Remove the stream_status member from scsi_stream_status_header
Having a variable length array at the end of scsi_stream_status_header only causes problems. Remove it and switch sd_is_perm_stream(), which is the only place that currently uses it, to use the scsi_stream_status directly following it in the local buf structure. Besides being a much better data structure design, this also avoids a -Wflex-array-member-not-at-end warning. Reported-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250505060640.3398500-1-hch@lst.de Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_proto.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/scsi/scsi_proto.h b/include/scsi/scsi_proto.h
index aeca37816506..f64385cde5b9 100644
--- a/include/scsi/scsi_proto.h
+++ b/include/scsi/scsi_proto.h
@@ -346,10 +346,9 @@ static_assert(sizeof(struct scsi_stream_status) == 8);
/* GET STREAM STATUS parameter data */
struct scsi_stream_status_header {
- __be32 len; /* length in bytes of stream_status[] array. */
+ __be32 len; /* length in bytes of following payload */
u16 reserved;
__be16 number_of_open_streams;
- DECLARE_FLEX_ARRAY(struct scsi_stream_status, stream_status);
};
static_assert(sizeof(struct scsi_stream_status_header) == 8);