Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp486517ybl; Tue, 28 Jan 2020 06:42:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzWEXqtvr8buWnzwZPSwFvDPnTDkLqkmvvK3MkZImHN9J8E/Xd0Ou2Rjh088gcJeCP6M0fd X-Received: by 2002:a9d:68c8:: with SMTP id i8mr9866146oto.34.1580222574589; Tue, 28 Jan 2020 06:42:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580222574; cv=none; d=google.com; s=arc-20160816; b=MBHbCcajnB01AzNlkRSAw1Yr0Nio0Qm3rRHlJ3aQQHY1+7lBfHNVRpZCHAzQ+hugib 3eAJz7DnJ2XIjA7km5PgEBSQEYzReSrIzd1MKUoo8K9o/9Q57f8XQMnzPt7vkOtF0StG SKpwifRIK0s1f0KkFEfQYGlb6XJkwV/P52Yzjf1zD4gSUztS4lCNHMIY4+24UcT+Rk+z VPEFjGTlzqoZ5FCTeFEWlRWE9q9HOFMkSLIMHRalwWPYN9sMqrZVX0dXRU1sEPzHVJaC tTR65cIlLWOcqu/oQNqPiN1294jboxKsRbfoSYHSY2DANNaz6UUwGPi8L5MBktrG+m7u Qlfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7vTqMcvgGai626TBPFFgT0g0F6TXjdBafMsaz4xdzWA=; b=yztiBcrhlUxQlwHBCj2MFBInOzv7w5h5GdObMwpwTeHd9PxpfgVPE9jI0DR7RHxINS lGay0kULL7xFCC0sqwgHqgZmZKA10p1c7zR1GdXz6hJtx5I4nBwn0J/RooZRTUQ0TqpF GS1erSSohndGGfFWCpMtlnTPsJx2o/5KIxbkMKXdIPMig5iuykSNInb4oqnwWFUIbxYw DP1bktuVHNppgBpvYiGls87Jvrizg/cCMGj/bbQwGOoXovXki1oWYw29q7RY8Hjs0/Km QbBv0+lY99+MPtQHszfC4RDCQC/sksCiwQwYGTDvejGkUkR9aHIA3fTfP1izMeOaUguT otsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iGdQYl7n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5si8869446otg.66.2020.01.28.06.42.42; Tue, 28 Jan 2020 06:42:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iGdQYl7n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730229AbgA1OQC (ORCPT + 99 others); Tue, 28 Jan 2020 09:16:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:38888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729232AbgA1OP6 (ORCPT ); Tue, 28 Jan 2020 09:15:58 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 30BF824681; Tue, 28 Jan 2020 14:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220957; bh=Tmkx2iMyfBzMDsHXzxoDgDwJzf6OhDsj9P7OB2cIr4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iGdQYl7ngzi+6o5QW2ZII4yba9EqTHR+sivQAVYFPfIpUzjvBkVx444p3YNEP/ikk 3eYk9Z7Jok3mz0XHWVXUUrfwCGHRreISqKp+Oy2+VUSxn3ST14Qr1O4cKVjqsw0GoU patMw2sVc/lvf2p730XaBlK6bgY8GSB/tKpD8m4U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anders Roxell , Takashi Iwai , Sasha Levin Subject: [PATCH 4.9 006/271] ALSA: hda: fix unused variable warning Date: Tue, 28 Jan 2020 15:02:35 +0100 Message-Id: <20200128135852.850786903@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anders Roxell [ 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 Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- 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 b83feecf1e40c..8f93869982703 100644 --- a/sound/pci/hda/hda_controller.h +++ b/sound/pci/hda/hda_controller.h @@ -171,11 +171,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