ASoC: Intel: avs: replace strcmp with sysfs_streq
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;
| ^~
Using the sysfs_streq as an alternative to strcmp helps getting around
this build failure.
Please also refer
https://docs.kernel.org/core-api/kernel-api.html#c.__sysfs_match_string
Signed-off-by: Brahmajit Das <listout@listout.xyz>
Link: https://patch.msgid.link/20251221185531.6453-1-listout@listout.xyz
Signed-off-by: Mark Brown <broonie@kernel.org>