All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: kernel test robot <lkp@intel.com>,
	oe-kbuild-all@lists.linux.dev, Mark Brown <broonie@kernel.org>
Subject: Re: [linux-next:master 8699/10823] sound/soc/sdca/sdca_interrupts.c:220:1: warning: the frame size of 1264 bytes is larger than 1024 bytes
Date: Mon, 21 Jul 2025 09:58:27 +0100	[thread overview]
Message-ID: <aH4BM1anJP4hR+yR@opensource.cirrus.com> (raw)
In-Reply-To: <28f4b539-e88a-47b0-a7db-f04a20c7275d@app.fastmail.com>

On Fri, Jul 18, 2025 at 05:50:23PM +0200, Arnd Bergmann wrote:
> On Fri, Jul 18, 2025, at 16:43, kernel test robot wrote:
> > First bad commit (maybe != root cause):
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   024e09e444bd2b06aee9d1f3fe7b313c7a2df1bb
> > commit: 6894e49b7b62cdb0edbcaaa23ea0218edb3b02dd [8699/10823] ASoC: SDCA: Kconfig Makefile fixups
> 
> The actual root cause was commit b9ab3b618241 ("ASoC: SDCA: Add some
> initial IRQ handlers"), which introduced the new interrupt handler.
> 
> > If you fix the issue in a separate patch/commit (i.e. not just a new 
> > version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: 
> > https://lore.kernel.org/oe-kbuild-all/202507182222.OLgOy9fX-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> >    sound/soc/sdca/sdca_interrupts.c: In function 'detected_mode_handler':
> >>> sound/soc/sdca/sdca_interrupts.c:220:1: warning: the frame size of 1264 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> >      220 | }
> >          | ^
> 
> I have not seen this one in my testing, but I have looked at
> a lot of similar issues recently.
> 
> 
> The first thing I see is the "struct snd_ctl_elem_value" structure
> on the stack, which is about 700 bytes long. This is probably
> too big for the stack, but doesn't explain the warning by itself.
> 
> Seeing that only a single integer (ucontrol.value.enumerated.item[0])
> is actually initialized in the structure that gets passed down,
> I wonder if it could just call a different interface instead that
> takes a u32 argument instead of the full ucontrol.
> 
> Alternatively, the ucontrol could be preallocated, e.g. in
> struct sdca_interrupt, as there should be no concurrent callers
> of detect_mode_handler for a single sdca_interrupt.

I have a patch I will send out shortly, although I have just gone
for the lazy allocate it locally approach. The jack detect is
hardly a critical path since it only runs when someone plugs
in/out a jack, so keeping it simple seemed best.

Thanks,
Charles

      reply	other threads:[~2025-07-21  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-18 14:43 [linux-next:master 8699/10823] sound/soc/sdca/sdca_interrupts.c:220:1: warning: the frame size of 1264 bytes is larger than 1024 bytes kernel test robot
2025-07-18 15:50 ` Arnd Bergmann
2025-07-21  8:58   ` Charles Keepax [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=aH4BM1anJP4hR+yR@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.