mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: kernel test robot <lkp@intel.com>,
	Mateusz Gorski <mateusz.gorski@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Mark Brown <broonie@kernel.org>,
	Cezary Rojewski <cezary.rojewski@intel.com>
Subject: Re: sound/soc/intel/skylake/skl-topology.c:3642:1: warning: the frame size of 1256 bytes is larger than 1024 bytes
Date: Wed, 4 Nov 2020 11:10:22 -0600	[thread overview]
Message-ID: <471bf009-0930-4a06-3f74-9f1414db56ef@linux.intel.com> (raw)
In-Reply-To: <202011041516.a6zglw24-lkp@intel.com>


>     sound/soc/intel/skylake/skl-topology.c: In function 'skl_tplg_complete':
>>> sound/soc/intel/skylake/skl-topology.c:3642:1: warning: the frame size of 1256 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>      3642 | }
>           | ^
> 
> vim +3642 sound/soc/intel/skylake/skl-topology.c
> 
>    3612	
>    3613	static void skl_tplg_complete(struct snd_soc_component *component)
>    3614	{
>    3615		struct snd_soc_dobj *dobj;
>    3616		struct snd_soc_acpi_mach *mach =
>    3617			dev_get_platdata(component->card->dev);
>    3618		int i;
>    3619	
>    3620		list_for_each_entry(dobj, &component->dobj_list, list) {
>    3621			struct snd_kcontrol *kcontrol = dobj->control.kcontrol;
>    3622			struct soc_enum *se =
>    3623				(struct soc_enum *)kcontrol->private_value;
>    3624			char **texts = dobj->control.dtexts;
>    3625			char chan_text[4];
>    3626	
>    3627			if (dobj->type != SND_SOC_DOBJ_ENUM ||
>    3628			    dobj->control.kcontrol->put !=
>    3629			    skl_tplg_multi_config_set_dmic)
>    3630				continue;
>    3631			sprintf(chan_text, "c%d", mach->mach_params.dmic_num);
>    3632	
>    3633			for (i = 0; i < se->items; i++) {
>    3634				struct snd_ctl_elem_value val;

that structure seems to be the root-cause of this warning. This can take 
512+128 bytes and probably does not belong on the stack.

struct snd_ctl_elem_value {
	struct snd_ctl_elem_id id;	/* W: element ID */
	unsigned int indirect: 1;	/* W: indirect access - obsoleted */
	union {
		union {
			long value[128];
			long *value_ptr;	/* obsoleted */
		} integer;
		union {
			long long value[64];
			long long *value_ptr;	/* obsoleted */
		} integer64;
		union {
			unsigned int item[128];
			unsigned int *item_ptr;	/* obsoleted */
		} enumerated;
		union {
			unsigned char data[512];
			unsigned char *data_ptr;	/* obsoleted */
		} bytes;
		struct snd_aes_iec958 iec958;
	} value;		/* RO */
	unsigned char reserved[128];
};

>    3635	
>    3636				if (strstr(texts[i], chan_text)) {
>    3637					val.value.enumerated.item[0] = i;
>    3638					kcontrol->put(kcontrol, &val);
>    3639				}
>    3640			}
>    3641		}
>> 3642	}


  reply	other threads:[~2020-11-04 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  7:09 kernel test robot
2020-11-04 17:10 ` Pierre-Louis Bossart [this message]
2020-11-04  7:55 kernel test robot

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=471bf009-0930-4a06-3f74-9f1414db56ef@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mateusz.gorski@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

Powered by JetHome