From patchwork Sat Dec 4 17:44:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 520786 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32A9EC433F5 for ; Sat, 4 Dec 2021 17:46:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8CE0D24BD; Sat, 4 Dec 2021 18:45:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8CE0D24BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1638640001; bh=SKTOiEnCRSF1blw0CzZe+GV1RIbwCYCpvBVjjm5D05I=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=uyxH3c/Q9p+tB1jp/M0DqKa5110NC1km3MhtmB8oglYS+odXMucQI/PO//u8ApAJq jnTIV2Zkx7pcfXeJQx1tHZCyUkfVCTPaL+ZTZgUiDb5BNsSFGgeAkBp3PdaavWLP3t dpwcBVaBCU09lzJaIIrG+e7LOdJj15f45yGYbBGw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C5E4FF8024C; Sat, 4 Dec 2021 18:45:49 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5D78BF80134; Sat, 4 Dec 2021 18:45:47 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 13A89F80134; Sat, 4 Dec 2021 18:45:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 13A89F80134 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m0MsmUYr" 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 AD69460EAB; Sat, 4 Dec 2021 17:45:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1CC5C341C0; Sat, 4 Dec 2021 17:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638639935; bh=SKTOiEnCRSF1blw0CzZe+GV1RIbwCYCpvBVjjm5D05I=; h=From:To:Cc:Subject:Date:From; b=m0MsmUYrwuVUwKl6MZElcwxrLizu/pvR3AR8zk2PHOHYKVJxiWKhKJHu6p271XZaf gNYpo6z4q2n5vFU7JbZ24L6EhTEl+SGo78rEKizqJvj2z18XyZ43sVMlajy28z8T3M aLWaL07Bbrekg9klx6pKn5wvOuPj43pJMAYGReJnnQdTxfCsGn7vKFwtmnUT8BbypD 2j2WABgRJUFkfYYGbU7iwInvTSEffsHgCqNDyZ8sY17MTG4ZiH2jPzqYvNGXslHJa2 zU/JEuwUxtdf6ixCzLw6wlaxAioKp10v0jUHTbzxIXUy1I5uJeoOqs6jaFHjhMzS1i s71zdUjirwvug== From: Arnd Bergmann To: Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta Subject: [PATCH] ASoC: SOF: Intel: move CODEC_PROBE_RETRIES definition Date: Sat, 4 Dec 2021 18:44:47 +0100 Message-Id: <20211204174529.1122697-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Arnd Bergmann , linux-kernel@vger.kernel.org, Mark Brown , Takashi Iwai , Hui Wang , Kai-Heng Feng , Bard Liao , sound-open-firmware@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Arnd Bergmann The macro is defined in an #ifdef but used outside: sound/soc/sof/intel/hda-codec.c: In function 'hda_codec_probe': sound/soc/sof/intel/hda-codec.c:132:42: error: 'CODEC_PROBE_RETRIES' undeclared (first use in this function) 132 | } while (resp == -1 && retry++ < CODEC_PROBE_RETRIES); | ^~~~~~~~~~~~~~~~~~~ Move it to a place where it can be seen unconditionally. Fixes: 046aede2f847 ("ASoC: SOF: Intel: Retry codec probing if it fails") Signed-off-by: Arnd Bergmann --- sound/soc/sof/intel/hda-codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c index 13cd96e6724a..4324178b3ca6 100644 --- a/sound/soc/sof/intel/hda-codec.c +++ b/sound/soc/sof/intel/hda-codec.c @@ -20,9 +20,10 @@ #include "../../codecs/hdac_hda.h" #endif /* CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC */ +#define CODEC_PROBE_RETRIES 3 + #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) #define IDISP_VID_INTEL 0x80860000 -#define CODEC_PROBE_RETRIES 3 /* load the legacy HDA codec driver */ static int request_codec_module(struct hda_codec *codec)