public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>,
	Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Cox <alan@linux.intel.com>, Arnd Bergmann <arnd@arndb.de>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Kees Cook <kees@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging/atomisp: reduce load_primary_binaries() stack usage
Date: Thu, 26 Mar 2026 12:44:56 +0200	[thread overview]
Message-ID: <acUOKIf3avxEPglo@ashevche-desk.local> (raw)
In-Reply-To: <20260325125948.1385064-1-arnd@kernel.org>

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@intel.com>

*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.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-03-26 10:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 12:59 [PATCH] staging/atomisp: reduce load_primary_binaries() stack usage Arnd Bergmann
2026-03-26 10:44 ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acUOKIf3avxEPglo@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=alan@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox