Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp1938223rwa; Sun, 21 Aug 2022 21:49:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR7/dBSZH1wWCqLWDyL2VeZgm8fB2uvgj/JKyScPyjG5OyWXq18Mxjg0XMfQ8zCMbgGVJMSf X-Received: by 2002:a17:903:2614:b0:172:9db6:3b4 with SMTP id jd20-20020a170903261400b001729db603b4mr18524928plb.86.1661143798416; Sun, 21 Aug 2022 21:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661143798; cv=none; d=google.com; s=arc-20160816; b=hUaeKmRxYLH90k2R67hSBQWOLmqc/6aYFAnxGX2s6astOsn08MlBh1m4HdVUhayL9S aTKM5FpZbR3WwqYTsEIUvnwmk6PZ8GlUYMmC4y4BMZeBC3dzvVmzXLKSmz3Ol+EZgobC NTmt4tf/bLW0ojDqNTVy/PX6JjMVSzZAf2H08JXMxaQEVV0ZBgqgEMPbLlIxGpPloTeE T0FKY8kIgxjvYG22tSIYK1akr3Yuue7QFvuRlgVOoSeT8RbHgGLywrIrV1FCre7PzDAf 26YD6jGVlCgPZyAWq564a5AFGjDbT+W4sPyQRap9I9GWvss9qsVfLqS8ecqYKsETyTFq mf1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5latV0Mk8VbZNLBjlnAxMqi67BNlXTnhTQUVcPL5BHw=; b=VRULMpr2UOh3QZKPeWC1J1NDZXiNAXBGtBdBh3eoEWK5O90ku2XvxH/lB3S9N5f2MY 0sSSKZQ0glKVLJMOfd0mWNLviKSM96jl4E7JG1O5TLRPyVCesHBxMzhK68GhzPAByUDF F317p9h5tzkXqTVMR9PxPwQTFJdF03vm5OFGzS2toeKSI+PJRm/ysZGAUUJTDSPkp8Qc bPNoqxsrd3ItJ6iFL2vyBgUCTZwG1TllZ8cbA5oJTCmBZhEIxs6FlaV6CwUdK7Bapcn+ Fkk324nxVgVIkHn78QHv+19GZvx8juYQ9UilbWysgGMeDyHgP7JLXzs7eyAgHVzbz53P aQ/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a63e155000000b00415d0947647si7971254pgk.184.2022.08.21.21.49.43; Sun, 21 Aug 2022 21:49:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230437AbiHVDvk (ORCPT + 99 others); Sun, 21 Aug 2022 23:51:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbiHVDvi (ORCPT ); Sun, 21 Aug 2022 23:51:38 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F32E920F5E for ; Sun, 21 Aug 2022 20:51:36 -0700 (PDT) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4M9yy01ctMzlWGb; Mon, 22 Aug 2022 11:48:24 +0800 (CST) Received: from dggphis33418.huawei.com (10.244.148.83) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 22 Aug 2022 11:51:34 +0800 From: Gaosheng Cui To: , , , , , , , , , , CC: , Subject: [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec Date: Mon, 22 Aug 2022 11:51:33 +0800 Message-ID: <20220822035133.2147381-1-cuigaosheng1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.244.148.83] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n, gcc warns about an unused variable: sound/soc/intel/skylake/skl.c: In function ‘probe_codec’: sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable] struct skl_dev *skl = bus_to_skl(bus); ^~~ cc1: all warnings being treated as errors Fixes: 3fd63658caed9 ("ASoC: Intel: Drop hdac_ext usage for codec device creation") Signed-off-by: Gaosheng Cui --- sound/soc/intel/skylake/skl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index c7c1cad2a753..52a041d6144c 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -726,8 +726,8 @@ static int probe_codec(struct hdac_bus *bus, int addr) unsigned int cmd = (addr << 28) | (AC_NODE_ROOT << 20) | (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; unsigned int res = -1; - struct skl_dev *skl = bus_to_skl(bus); #if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC) + struct skl_dev *skl = bus_to_skl(bus); struct hdac_hda_priv *hda_codec; #endif struct hda_codec *codec; -- 2.25.1