]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: sof-nau8825: fix module alias overflow
authorArnd Bergmann <arnd@arndb.de>
Wed, 21 Dec 2022 13:24:56 +0000 (14:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:23 +0000 (11:58 +0100)
commit09fe8083c0bd676d0fe32b8e84ddc8eb5deee7ce
treed5dcf9f84177b24e0666c95dcdce1d9acafdc94a
parent280fa1bf47f74cb6d3ef2c3fb768286ee6d026ac
ASoC: Intel: sof-nau8825: fix module alias overflow

[ Upstream commit a4887689e36e7e5a5cd26fabbe9dd647b1ad55a3 ]

The maximum name length for a platform_device_id entry is 20 characters
including the trailing NUL byte. The sof_nau8825.c file exceeds that,
which causes an obscure error message:

sound/soc/intel/boards/snd-soc-sof_nau8825.mod.c:35:45: error: illegal character encoding in string literal [-Werror,-Winvalid-source-encoding]
MODULE_ALIAS("platform:adl_max98373_nau8825<U+0018><AA>");
                                                   ^~~~
include/linux/module.h:168:49: note: expanded from macro 'MODULE_ALIAS'
                                                ^~~~~~
include/linux/module.h:165:56: note: expanded from macro 'MODULE_INFO'
                                                       ^~~~
include/linux/moduleparam.h:26:47: note: expanded from macro '__MODULE_INFO'
                = __MODULE_INFO_PREFIX __stringify(tag) "=" info

I could not figure out how to make the module handling robust enough
to handle this better, but as a quick fix, using slightly shorter
names that are still unique avoids the build issue.

Fixes: 3e1929062371 ("ASoC: Intel: add sof-nau8825 machine driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221221132515.2363276-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/intel/boards/sof_nau8825.c
sound/soc/intel/common/soc-acpi-intel-adl-match.c