public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] scsi: Replace zero-length array with flexible array member
@ 2024-11-10 22:33 Thorsten Blum
  2024-12-04 18:06 ` Martin K. Petersen
  2024-12-10  2:35 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2024-11-10 22:33 UTC (permalink / raw)
  To: Lee Duncan, Chris Leech, Mike Christie, James E.J. Bottomley,
	Martin K. Petersen
  Cc: linux-hardening, Gustavo A. R. Silva, Thorsten Blum, open-iscsi,
	linux-scsi, linux-kernel

Replace the deprecated zero-length array with a modern flexible array
member in the struct iscsi_bsg_host_vendor_reply.

Link: https://github.com/KSPP/linux/issues/78
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Changes in v2:
- Use DECLARE_FLEX_ARRAY() as suggested by Gustavo A. R. Silva
- Link to v1: https://lore.kernel.org/r/20241110151749.3311-2-thorsten.blum@linux.dev/
---
 include/scsi/scsi_bsg_iscsi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/scsi/scsi_bsg_iscsi.h b/include/scsi/scsi_bsg_iscsi.h
index 9b1f0f424a79..a569c35b258d 100644
--- a/include/scsi/scsi_bsg_iscsi.h
+++ b/include/scsi/scsi_bsg_iscsi.h
@@ -59,7 +59,7 @@ struct iscsi_bsg_host_vendor {
  */
 struct iscsi_bsg_host_vendor_reply {
 	/* start of vendor response area */
-	uint32_t vendor_rsp[0];
+	DECLARE_FLEX_ARRAY(uint32_t, vendor_rsp);
 };
 
 
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] scsi: Replace zero-length array with flexible array member
  2024-11-10 22:33 [PATCH v2] scsi: Replace zero-length array with flexible array member Thorsten Blum
@ 2024-12-04 18:06 ` Martin K. Petersen
  2024-12-10  2:35 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2024-12-04 18:06 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Lee Duncan, Chris Leech, Mike Christie, James E.J. Bottomley,
	Martin K. Petersen, linux-hardening, Gustavo A. R. Silva,
	open-iscsi, linux-scsi, linux-kernel


Thorsten,

> Replace the deprecated zero-length array with a modern flexible array
> member in the struct iscsi_bsg_host_vendor_reply.

Applied to 6.14/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] scsi: Replace zero-length array with flexible array member
  2024-11-10 22:33 [PATCH v2] scsi: Replace zero-length array with flexible array member Thorsten Blum
  2024-12-04 18:06 ` Martin K. Petersen
@ 2024-12-10  2:35 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2024-12-10  2:35 UTC (permalink / raw)
  To: Lee Duncan, Chris Leech, Mike Christie, James E.J. Bottomley,
	Thorsten Blum
  Cc: Martin K . Petersen, linux-hardening, Gustavo A. R. Silva,
	open-iscsi, linux-scsi, linux-kernel

On Sun, 10 Nov 2024 23:33:24 +0100, Thorsten Blum wrote:

> Replace the deprecated zero-length array with a modern flexible array
> member in the struct iscsi_bsg_host_vendor_reply.
> 
> 

Applied to 6.14/scsi-queue, thanks!

[1/1] scsi: Replace zero-length array with flexible array member
      https://git.kernel.org/mkp/scsi/c/cdb03e598750

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-10  2:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-10 22:33 [PATCH v2] scsi: Replace zero-length array with flexible array member Thorsten Blum
2024-12-04 18:06 ` Martin K. Petersen
2024-12-10  2:35 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox