]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: sd: Remove the stream_status member from scsi_stream_status_header
authorChristoph Hellwig <hch@lst.de>
Mon, 5 May 2025 06:06:37 +0000 (08:06 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 May 2025 02:16:10 +0000 (22:16 -0400)
commitcd6856d38881f8137d795b64ff5587c0232a0c34
treeb0229641e32230c52a813beda4a1f8350100cbcc
parent73349697fd997cce9c2f04f35fbcc3544b643a89
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>
drivers/scsi/sd.c
include/scsi/scsi_proto.h