From: Brahmajit Das <listout@listout.xyz>
To: "Amadeusz Sławiński" <amade@asmblr.net>
Cc: Mark Brown <broonie@kernel.org>,
linux-sound@vger.kernel.org, linux-next@vger.kernel.org,
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: Wed, 24 Dec 2025 02:27:09 +0530 [thread overview]
Message-ID: <aUsBgVbloPqBa6sZ@localhost> (raw)
In-Reply-To: <20251223192409.50a6e4ab@fedora>
On 23.12.2025 19:24, Amadeusz Sławiński wrote:
> On Tue, 23 Dec 2025 17:07:04 +0000
> Mark Brown <broonie@kernel.org> wrote:
>
...snip...
>
> 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?
Does not seem to help, unfortunately :(
Current changes (after reverting my patch)
diff --git a/sound/soc/intel/avs/topology.h b/sound/soc/intel/avs/topology.h
index 1cf7455b6c01..ed839774bfe2 100644
--- a/sound/soc/intel/avs/topology.h
+++ b/sound/soc/intel/avs/topology.h
@@ -150,7 +150,7 @@ struct avs_tplg_binding {
struct avs_tplg_path_template_id {
u32 id;
- char tplg_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
+ char tplg_name[44];
};
struct avs_tplg_path_template {
Build output:
CALL scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
CC [M] sound/soc/intel/avs/path.o
In function ‘avs_tplg_path_template_id_equal’,
inlined from ‘avs_condpath_find_match’ at sound/soc/intel/avs/path.c:160:6,
inlined from ‘avs_condpaths_walk’ at sound/soc/intel/avs/path.c:1274:13:
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;
| ^~
sound/soc/intel/avs/topology.h:152:13: note: at offset 4 into source object ‘id’ of size 4
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:287: sound/soc/intel/avs/path.o] Error 1
make[5]: *** [scripts/Makefile.build:556: sound/soc/intel/avs] Error 2
make[4]: *** [scripts/Makefile.build:556: sound/soc/intel] Error 2
make[3]: *** [scripts/Makefile.build:556: sound/soc] Error 2
make[2]: *** [scripts/Makefile.build:556: sound] Error 2
make[1]: *** [/home/bdas/linux/Makefile:2060: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
--
Regards,
listout
next prev parent reply other threads:[~2025-12-23 20:57 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
2025-12-23 20:57 ` Brahmajit Das [this message]
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=aUsBgVbloPqBa6sZ@localhost \
--to=listout@listout.xyz \
--cc=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=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