Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1027368ybe; Wed, 4 Sep 2019 11:21:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqx11BMFcEGvTvtR1VKNCgAU2/g6/8QFwyC1oGOz2fuykc7w6a2LXRuamvWLmZovVnJlX+XS X-Received: by 2002:a17:902:7689:: with SMTP id m9mr24434006pll.158.1567621305954; Wed, 04 Sep 2019 11:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621305; cv=none; d=google.com; s=arc-20160816; b=EJHZKX0IZA/2NAWpPnLXXa3Liximi66HCoul6wO2goO2nThkg4389avok74omt2Lyr QfNV6Ke/+bpgnRAKWXliSvWMWWBs+eTEC/+dAmjHN1h9wPtISuVXsBDy0kRBDbY+bhMe dz1AmjHPDwtCb2kjs9NzyiRI7Scp+rBqeR2JOlXGdsFsV4KpYvewS/DLj5wRsir6uY/a Nfvcn4MkcoqTV7No+pnkRcQiaQzwwWwNjgq1zabkLAh1tZZC3hGUceB1TRADqRW8hVXp AWBo8KeLYFPLQ6kpeqjW60Zt/QCbB4c8obfCJus2pepxaltwpuQKlE1UyARkz12wLMOa jTfQ== 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=+Ss8F9HKc6wThWf7h39k5yruinThJ+U0gmUhbUF76TE=; b=QiLvrLxE2JYRiFbR24Oof2Nfc8rrZY2QoduUNnZupitClL2cjz9i5bkBUF1/EjmER0 7GIbdNOpESxmAfiIk2+88nsHoOqamSsm6p8wXoXdtDt4IkCHReS5AyvYa3z8z/aFOlGC f13Oy5lmaX5bccq9g9avX8imTpEOtKqIdGqGjMz4140nGnidemcpaLGc7RPyhjkfViY/ R2qzHk+4HNPBt7iOXhjrQ0Qejv15LEIanKhk8x9ek8Df7U5iGedU/naHRRaCmgqpPP3o zCOlcPfPJ9MhcP9cTtjiXITxOiZrupZyzJvbBZiZiSOHQbwhIqLrWpb0g/EpspCd8Dlw qWBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bta0XaXd; 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 j70si17206523pgd.500.2019.09.04.11.21.30; Wed, 04 Sep 2019 11:21:45 -0700 (PDT) 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=Bta0XaXd; 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 S1732209AbfIDSJT (ORCPT + 99 others); Wed, 4 Sep 2019 14:09:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:52448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389914AbfIDSJQ (ORCPT ); Wed, 4 Sep 2019 14:09:16 -0400 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 E60C22339E; Wed, 4 Sep 2019 18:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620555; bh=mjhjiaq1QdfltCiZlfRzdCMexNftjOrnurhCTR9y43M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bta0XaXdY4PJgvsNxydrnlp+TjLZbFSgQ4ekwj5aZW0+9goZ5IFINYEI6mgctWG+7 j4Q4ALHMbu0Vzi0fMSgp0K+89DrdPp4bdPVL7PUusugNa5n+vDyBoQw4A2g/RJmsUB XQpXqNRtU2JLKQr42ws74qYLilQCsHAFRpzDC0Iw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Nathan Chancellor , Linus Walleij , Vinod Koul , Sasha Levin Subject: [PATCH 5.2 001/143] dmaengine: ste_dma40: fix unneeded variable warning Date: Wed, 4 Sep 2019 19:52:24 +0200 Message-Id: <20190904175314.264270277@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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 [ Upstream commit 5d6fb560729a5d5554e23db8d00eb57cd0021083 ] clang-9 points out that there are two variables that depending on the configuration may only be used in an ARRAY_SIZE() expression but not referenced: drivers/dma/ste_dma40.c:145:12: error: variable 'd40_backup_regs' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static u32 d40_backup_regs[] = { ^ drivers/dma/ste_dma40.c:214:12: error: variable 'd40_backup_regs_chan' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static u32 d40_backup_regs_chan[] = { Mark these __maybe_unused to shut up the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20190712091357.744515-1-arnd@arndb.de Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/ste_dma40.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 89d710899010d..de8bfd9a76e9e 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -142,7 +142,7 @@ enum d40_events { * when the DMA hw is powered off. * TODO: Add save/restore of D40_DREG_GCC on dma40 v3 or later, if that works. */ -static u32 d40_backup_regs[] = { +static __maybe_unused u32 d40_backup_regs[] = { D40_DREG_LCPA, D40_DREG_LCLA, D40_DREG_PRMSE, @@ -211,7 +211,7 @@ static u32 d40_backup_regs_v4b[] = { #define BACKUP_REGS_SZ_V4B ARRAY_SIZE(d40_backup_regs_v4b) -static u32 d40_backup_regs_chan[] = { +static __maybe_unused u32 d40_backup_regs_chan[] = { D40_CHAN_REG_SSCFG, D40_CHAN_REG_SSELT, D40_CHAN_REG_SSPTR, -- 2.20.1