From nobody Wed Sep 17 08:54:53 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2ECAC4332F for ; Wed, 21 Dec 2022 13:25:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232901AbiLUNZ3 (ORCPT ); Wed, 21 Dec 2022 08:25:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbiLUNZ0 (ORCPT ); Wed, 21 Dec 2022 08:25:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C85DE220C7 for ; Wed, 21 Dec 2022 05:25:25 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5F09A617A8 for ; Wed, 21 Dec 2022 13:25:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43971C433D2; Wed, 21 Dec 2022 13:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671629124; bh=g6jee0CSun7KRiuaMBv5r2gX/s8rOE47WIb/+eVUIkk=; h=From:To:Cc:Subject:Date:From; b=IZm8zrCAB7DLTXIG+LDNCZlJg9QAwDos+ye87GjOB85qaA/OiJ8J0Wd0o7BDdgFQr yLlf3nxMM0o38dgxPhGUKuVHpEwEWRB5mJRvHUVmw28rrKz41Upr1ULZ2LKTeC1bFz wrZVbZMSnsMbF+twTBNaTe7MCnIytkRSJMAc7TFlzjhLe9zr4EZn2we2CYPkZlhgWc 0tszDwwXUXVHN5fJf+qbC4IGl5wdssHZ4ZBKZQRuO2aSJbmgIUOePswqi1neFB3UtL fPlausRsFqh0XX71fkhyLyu4Y2ocv3m7HP9pb9YtTsfEFgQ8VmMiK7r6M59rz5kF1W tE+G4QLbMTvMQ== From: Arnd Bergmann To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen Cc: Arnd Bergmann , Mark Brown , Jaroslav Kysela , Takashi Iwai , Akihiko Odaki , Brent Lu , Yong Zhi , ye xingchen , Muralidhar Reddy , Ajye Huang , David Lin , Libin Yang , Mac Chiang , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: Intel: sof-nau8825: fix module alias overflow Date: Wed, 21 Dec 2022 14:24:56 +0100 Message-Id: <20221221132515.2363276-1-arnd@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann 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 char= acter encoding in string literal [-Werror,-Winvalid-source-encoding] MODULE_ALIAS("platform:adl_max98373_nau8825"); ^~~~ 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' =3D __MODULE_INFO_PREFIX __stringify(tag) "=3D" 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: 8d0872f6239f ("ASoC: Intel: add sof-nau8825 machine driver") Signed-off-by: Arnd Bergmann Acked-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_nau8825.c | 8 ++++---- sound/soc/intel/common/soc-acpi-intel-adl-match.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/intel/boards/sof_nau8825.c b/sound/soc/intel/boards/= sof_nau8825.c index 27880224359d..009a41fbefa1 100644 --- a/sound/soc/intel/boards/sof_nau8825.c +++ b/sound/soc/intel/boards/sof_nau8825.c @@ -618,7 +618,7 @@ static const struct platform_device_id board_ids[] =3D { =20 }, { - .name =3D "adl_rt1019p_nau8825", + .name =3D "adl_rt1019p_8825", .driver_data =3D (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) | SOF_SPEAKER_AMP_PRESENT | SOF_RT1019P_SPEAKER_AMP_PRESENT | @@ -626,7 +626,7 @@ static const struct platform_device_id board_ids[] =3D { SOF_NAU8825_NUM_HDMIDEV(4)), }, { - .name =3D "adl_max98373_nau8825", + .name =3D "adl_max98373_8825", .driver_data =3D (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) | SOF_SPEAKER_AMP_PRESENT | SOF_MAX98373_SPEAKER_AMP_PRESENT | @@ -637,7 +637,7 @@ static const struct platform_device_id board_ids[] =3D { }, { /* The limitation of length of char array, shorten the name */ - .name =3D "adl_mx98360a_nau8825", + .name =3D "adl_mx98360a_8825", .driver_data =3D (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) | SOF_SPEAKER_AMP_PRESENT | SOF_MAX98360A_SPEAKER_AMP_PRESENT | @@ -648,7 +648,7 @@ static const struct platform_device_id board_ids[] =3D { =20 }, { - .name =3D "adl_rt1015p_nau8825", + .name =3D "adl_rt1015p_8825", .driver_data =3D (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) | SOF_SPEAKER_AMP_PRESENT | SOF_RT1015P_SPEAKER_AMP_PRESENT | diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/= intel/common/soc-acpi-intel-adl-match.c index 60aee56f94bd..1f79fef600ac 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -474,21 +474,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machi= nes[] =3D { }, { .id =3D "10508825", - .drv_name =3D "adl_rt1019p_nau8825", + .drv_name =3D "adl_rt1019p_8825", .machine_quirk =3D snd_soc_acpi_codec_list, .quirk_data =3D &adl_rt1019p_amp, .sof_tplg_filename =3D "sof-adl-rt1019-nau8825.tplg", }, { .id =3D "10508825", - .drv_name =3D "adl_max98373_nau8825", + .drv_name =3D "adl_max98373_8825", .machine_quirk =3D snd_soc_acpi_codec_list, .quirk_data =3D &adl_max98373_amp, .sof_tplg_filename =3D "sof-adl-max98373-nau8825.tplg", }, { .id =3D "10508825", - .drv_name =3D "adl_mx98360a_nau8825", + .drv_name =3D "adl_mx98360a_8825", .machine_quirk =3D snd_soc_acpi_codec_list, .quirk_data =3D &adl_max98360a_amp, .sof_tplg_filename =3D "sof-adl-max98360a-nau8825.tplg", @@ -502,7 +502,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machine= s[] =3D { }, { .id =3D "10508825", - .drv_name =3D "adl_rt1015p_nau8825", + .drv_name =3D "adl_rt1015p_8825", .machine_quirk =3D snd_soc_acpi_codec_list, .quirk_data =3D &adl_rt1015p_amp, .sof_tplg_filename =3D "sof-adl-rt1015-nau8825.tplg", --=20 2.35.1