[PATCH v2 10/18] media: venus: Use flex array for hfi_session_release_buffer_pkt

Ricardo Ribalda ribalda at chromium.org
Wed May 22 05:54:43 PDT 2024


Hi Bryan


On Fri, 10 May 2024 at 02:10, Bryan O'Donoghue
<bryan.odonoghue at linaro.org> wrote:
>
> On 10/05/2024 00:37, Bryan O'Donoghue wrote:
> >> -    u32 buffer_info[1];
> >> +    u32 buffer_info[];
> >>   };
> >>   struct hfi_session_release_resources_pkt {
> >>
> > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue at linaro.org>
>
> Oops no.
>
> Please don't change the size of the structure.

In this case buffer_info[] is a real flexible array, so there is not
much we can do.

The driver seems to only uses the structure to address memory. It is
not allocating the structure or doing any calculations based on its
size, so it should be fine (famous last words).

If anyone has access to the hardware it would be great if they tested it :)

>
> u32 buffer_info;
>
> ---
> bod



-- 
Ricardo Ribalda



More information about the linux-arm-kernel mailing list