Re: [PATCH] staging/atomisp: reduce load_primary_binaries() stack usage
From: Sakari Ailus
Date: Wed May 20 2026 - 06:27:47 EST
On Thu, Mar 26, 2026 at 12:44:56PM +0200, Andy Shevchenko wrote:
> On Wed, Mar 25, 2026 at 01:59:43PM +0100, Arnd Bergmann wrote:
>
> > The load_primary_binaries() function is overly complex and has som large
>
> some
>
> > variables on the stack, which can cause warnings depending on CONFIG_FRAME_WARN
> > setting:
> >
> > drivers/staging/media/atomisp/pci/sh_css.c: In function 'load_primary_binaries':
> > drivers/staging/media/atomisp/pci/sh_css.c:5260:1: error: the frame size of 1560 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]
> >
> > Half of the stack usage is for the prim_descr[] array, but only one
> > member of the array is used at any given time.
> >
> > Reduce the stack usage by turning the array into a single structure.
>
> Makes sense,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
> *I think the original idea was to construct some chains out of the firmware
> blobs and provide run-time combinations of them, but IIRC that was never
> implemented.
Thanks.
I'll add Cc: stable to make CI happy and this can't hurt in the stable
trees anyway.
--
Sakari Ailus