alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Takashi Iwai <tiwai@suse.de>, Sasha Levin <sashal@kernel.org>,
	alsa-devel@alsa-project.org,
	Anders Roxell <anders.roxell@linaro.org>
Subject: [alsa-devel] [PATCH AUTOSEL 4.4 002/174] ALSA: hda: fix unused variable warning
Date: Thu, 16 Jan 2020 12:39:59 -0500	[thread overview]
Message-ID: <20200116174251.24326-2-sashal@kernel.org> (raw)
In-Reply-To: <20200116174251.24326-1-sashal@kernel.org>

From: Anders Roxell <anders.roxell@linaro.org>

[ Upstream commit 5b03006d5c58ddd31caf542eef4d0269bcf265b3 ]

When CONFIG_X86=n function azx_snoop doesn't use the variable chip it
only returns true.

sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’:
sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable]
  struct azx *chip = bus_to_azx(bus);
              ^~~~

Create a inline function of azx_snoop.

Fixes: a41d122449be ("ALSA: hda - Embed bus into controller object")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/pci/hda/hda_controller.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index 55ec4470f6b6..499873d29cc1 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -164,11 +164,10 @@ struct azx {
 #define azx_bus(chip)	(&(chip)->bus.core)
 #define bus_to_azx(_bus)	container_of(_bus, struct azx, bus.core)
 
-#ifdef CONFIG_X86
-#define azx_snoop(chip)		((chip)->snoop)
-#else
-#define azx_snoop(chip)		true
-#endif
+static inline bool azx_snoop(struct azx *chip)
+{
+	return !IS_ENABLED(CONFIG_X86) || chip->snoop;
+}
 
 /*
  * macros for easy use
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

       reply	other threads:[~2020-01-16 17:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200116174251.24326-1-sashal@kernel.org>
2020-01-16 17:39 ` Sasha Levin [this message]
2020-01-16 17:40 ` [alsa-devel] [PATCH AUTOSEL 4.4 004/174] ALSA: usb-audio: update quirk for B&W PX to remove microphone Sasha Levin
2020-01-16 17:40 ` [alsa-devel] [PATCH AUTOSEL 4.4 034/174] ASoC: imx-sgtl5000: put of nodes if finding codec fails Sasha Levin
2020-01-16 17:40 ` [alsa-devel] [PATCH AUTOSEL 4.4 050/174] ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of() Sasha Levin
2020-01-16 17:41 ` [alsa-devel] [PATCH AUTOSEL 4.4 081/174] ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk() Sasha Levin
2020-01-16 17:41 ` [alsa-devel] [PATCH AUTOSEL 4.4 083/174] ASoC: fix valid stream condition Sasha Levin
2020-01-16 17:41 ` [alsa-devel] [PATCH AUTOSEL 4.4 103/174] ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs Sasha Levin
2020-01-16 17:41 ` [alsa-devel] [PATCH AUTOSEL 4.4 115/174] ALSA: aoa: onyx: always initialize register read value Sasha Levin
2020-01-16 17:41 ` [alsa-devel] [PATCH AUTOSEL 4.4 120/174] ASoC: es8328: Fix copy-paste error in es8328_right_line_controls Sasha Levin
2020-01-16 17:41 ` [alsa-devel] [PATCH AUTOSEL 4.4 121/174] ASoC: cs4349: Use PM ops 'cs4349_runtime_pm' Sasha Levin
2020-01-16 17:41 ` [alsa-devel] [PATCH AUTOSEL 4.4 122/174] ASoC: wm8737: Fix copy-paste error in wm8737_snd_controls Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200116174251.24326-2-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=anders.roxell@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).