[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1e1a574-4dab-42bf-98d4-ed673de9f5b3@xs4all.nl>
Date: Thu, 30 May 2024 14:35:56 +0200
From: Hans Verkuil <hverkuil-cisco@...all.nl>
To: Ricardo Ribalda <ribalda@...omium.org>,
Michael Tretter <m.tretter@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Michal Simek <michal.simek@....com>, Andy Walls <awalls@...metrocast.net>,
Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
Vikash Garodia <quic_vgarodia@...cinc.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v3 04/18] media: dvb-frontend/mxl5xx: Use flex array for
MBIN_SEGMENT_T
On 27/05/2024 23:08, Ricardo Ribalda wrote:
> Replace the older style one-element array with a flexible array member.
> There does not seem to be any allocation for this struct in the code, so
> no more code changes are required.
>
> The following cocci warning is fixed:
> drivers/media/dvb-frontends/mxl5xx_defs.h:182:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
> drivers/media/dvb-frontends/mxl5xx_defs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/dvb-frontends/mxl5xx_defs.h b/drivers/media/dvb-frontends/mxl5xx_defs.h
> index 3c5d75ed8fea..512ec979f96f 100644
> --- a/drivers/media/dvb-frontends/mxl5xx_defs.h
> +++ b/drivers/media/dvb-frontends/mxl5xx_defs.h
> @@ -179,7 +179,7 @@ struct MBIN_SEGMENT_HEADER_T {
>
> struct MBIN_SEGMENT_T {
> struct MBIN_SEGMENT_HEADER_T header;
> - u8 data[1];
> + u8 data[];
> };
>
> enum MXL_CMD_TYPE_E { MXL_CMD_WRITE = 0, MXL_CMD_READ };
>
While this patch looks good to me, I'll skip it until my comment for the
previous patch is addressed. Actually, I think the two patches should be
combined, but I leave that up to you.
Regards,
Hans
Powered by blists - more mailing lists