From: "Amadeusz Sławiński" <amade@asmblr.net>
To: Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org, linux-next@vger.kernel.org,
Brahmajit Das <listout@listout.xyz>,
cezary.rojewski@intel.com, liam.r.girdwood@linux.intel.com,
peter.ujfalusi@linux.intel.com, tiwai@suse.com
Subject: Re: [PATCH] ASoC: Intel: avs: replace strcmp with sysfs_streq
Date: Tue, 23 Dec 2025 19:24:09 +0100 [thread overview]
Message-ID: <20251223192409.50a6e4ab@fedora> (raw)
In-Reply-To: <176650962400.445350.17331328109538303145.b4-ty@kernel.org>
On Tue, 23 Dec 2025 17:07:04 +0000
Mark Brown <broonie@kernel.org> wrote:
> On Mon, 22 Dec 2025 00:25:31 +0530, Brahmajit Das wrote:
> > allmodconfig failes to build with GCC 16 with the following build error
> >
> > sound/soc/intel/avs/path.c:137:38: error: ‘strcmp’ reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
> > 137 | return id->id == id2->id && !strcmp(id->tplg_name, id2->tplg_name);
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > ‘avs_condpaths_walk’: events 1-3
> > 137 | return id->id == id2->id && !strcmp(id->tplg_name, id2->tplg_name);
> > | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > | | |
> > | | (3) warning happens here
> > | (1) when the condition is evaluated to true
> > ......
> > 155 | if (id->id != path->template->owner->id ||
> > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > | |
> > | (2) when the condition is evaluated to false
> > 156 | strcmp(id->tplg_name, path->template->owner->owner->name))
> > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > In file included from sound/soc/intel/avs/path.h:14,
> > from sound/soc/intel/avs/path.c:15:
> > sound/soc/intel/avs/topology.h: In function ‘avs_condpaths_walk’:
> > sound/soc/intel/avs/topology.h:152:13: note: at offset 4 into source object ‘id’ of size 4
> > 152 | u32 id;
> > | ^~
> >
> > [...]
>
> Applied to
>
Missed this patch and it got applied...
Anyway above log seems bit weird, as this struct should be well defined:
struct avs_tplg_path_template_id {
u32 id;
char tplg_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
};
are you sure that SNDRV_CTL_ELEM_ID_NAME_MAXLEN didn't somehow end up
being 0? As that would be a real problem.
sysfs_streq is similar to strcmp, but with different order of checks so
it will just mask an issue, if there really is one. And reading its
description I don't think it should be used in this case.
Can you instead try reverting it and hardcoding value in struct like:
struct avs_tplg_path_template_id {
u32 id;
char tplg_name[44];
};
to see if the error is gone?
next prev parent reply other threads:[~2025-12-23 18:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-21 18:55 [PATCH] ASoC: Intel: avs: replace strcmp with sysfs_streq Brahmajit Das
2025-12-23 17:07 ` Mark Brown
2025-12-23 18:24 ` Amadeusz Sławiński [this message]
2025-12-23 20:57 ` Brahmajit Das
2025-12-24 10:05 ` Takashi Iwai
2025-12-24 11:35 ` Mark Brown
2025-12-29 10:03 ` Cezary Rojewski
2025-12-30 7:59 ` Brahmajit Das
2025-12-30 8:32 ` Brahmajit Das
2025-12-30 9:36 ` Cezary Rojewski
2025-12-30 12:25 ` Amadeusz Sławiński
2025-12-30 14:47 ` Richard Biener
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=20251223192409.50a6e4ab@fedora \
--to=amade@asmblr.net \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-next@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=listout@listout.xyz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=tiwai@suse.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