Re: [PATCH] scsi: mvumi: Replace 1-element arrays with flexible array members

From: Martin K. Petersen
Date: Thu Jan 12 2023 - 00:11:55 EST



Kees,

> One-element arrays (and multi-element arrays being treated as
> dynamically sized) are deprecated[1] and are being replaced with
> flexible array members in support of the ongoing efforts to tighten
> the FORTIFY_SOURCE routines on memcpy(), correctly instrument array
> indexing with UBSAN_BOUNDS, and to globally enable
> -fstrict-flex-arrays=3.
>
> Replace one-element arrays with flexible-array member in struct
> mvumi_msg_frame, struct mvumi_rsp_frame, and struct mvumi_hs_header,
> adjusting the explicit sizing calculations at the same time.

Applied to 6.3/scsi-staging, thanks!

--
Martin K. Petersen Oracle Linux Engineering