Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754650AbbFQMxt (ORCPT ); Wed, 17 Jun 2015 08:53:49 -0400 Received: from filter1.ibarracuda.nl ([83.247.7.10]:44719 "EHLO filter1.ibarracuda.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752878AbbFQMxl (ORCPT ); Wed, 17 Jun 2015 08:53:41 -0400 X-ASG-Debug-ID: 1434545609-0759e71f74479820002-xx1T2L X-Barracuda-Envelope-From: Frans.Klaver@xsens.com X-Barracuda-AUTH-User: xsenscom X-Barracuda-Apparent-Source-IP: 87.249.116.215 From: Frans Klaver To: Takashi Iwai CC: Frans Klaver , Jaroslav Kysela , Subject: [PATCH] sound: hda_intel: fix warning if SND_HDA_I915=n Date: Wed, 17 Jun 2015 14:53:19 +0200 X-ASG-Orig-Subj: [PATCH] sound: hda_intel: fix warning if SND_HDA_I915=n Message-ID: <1434545599-17662-1-git-send-email-frans.klaver@xsens.com> X-Mailer: git-send-email 2.3.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [172.16.11.49] X-Barracuda-Connect: rev-215.116.249.87.virtu.nl[87.249.116.215] X-Barracuda-Start-Time: 1434545609 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: https://filter1.ibarracuda.nl:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.19922 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1480 Lines: 45 When building with CONFIG_SND_HDA_I915=n, I get the following warning: sound/pci/hda/hda_intel.c: In function ‘azx_probe_continue’: sound/pci/hda/hda_intel.c:1882:2: warning: label ‘skip_i915’ defined but not used [-Wunused-label] skip_i915: ^ Fix this by using 'if (IS_ENABLED())' rather than #ifdef. Signed-off-by: Frans Klaver --- sound/pci/hda/hda_intel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index a244ba706317..d85a53ceab6d 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1856,8 +1856,8 @@ static int azx_probe_continue(struct azx *chip) int err; /* Request power well for Haswell HDA controller and codec */ - if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { -#ifdef CONFIG_SND_HDA_I915 + if (IS_ENABLED(CONFIG_SND_HDA_I915) && + chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { err = hda_i915_init(hda); if (err < 0) { /* if the controller is bound only with HDMI/DP @@ -1876,7 +1876,6 @@ static int azx_probe_continue(struct azx *chip) "Cannot turn on display power on i915\n"); goto out_free; } -#endif } skip_i915: -- 2.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/