From patchwork Fri Jul 12 09:13:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168921 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp605524ilk; Fri, 12 Jul 2019 02:14:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8nPwO67wT9n9UDOHaAj+Tkd8t6bdpaPyOTVsdTkneWE4Qc5sy7r83ww7c+e7q8OWtLU1i X-Received: by 2002:a17:90a:8d09:: with SMTP id c9mr10598308pjo.131.1562922850991; Fri, 12 Jul 2019 02:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562922850; cv=none; d=google.com; s=arc-20160816; b=MmCP8P5I+Ge8ZOd9pA6DPKCeEuZucUz9WyAaUW2pD8puH6lMrJCK2I8rRD9G1Duwon ZavfRDAdLgzl1EO2yTnbYgfPlrxHpGyVCJAr/ZQ1V8kR2vP7hAMx+CrMo+XHLk+eQUNt fglHMhoJI3iZSp0HCJBh44Pr9Q2F4VhFytS/hLaYrXN1I5VQMu4zKZ8KC8Hiry2uDAM9 dxY1Gh6UjMLoORrVFDKyZ6lLZBJYED6Uc6QWABUVdo28ZvMeV4KgsIAbkcqQ4Tb/VKut N6w9ctAoMDB3Nqv+Sjw6Uv5FISmq0obUoSh4kqEHCE9DZ0FCGuZ27UtMVP0uU9vG/V8Z MRdA== 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 :message-id:date:subject:cc:to:from; bh=U9XVMaQRoEEqYo8WHE0n9IzTeqfw2BmSbqR2O8p8iEo=; b=C+Gvq+zDxKYB8U2tnh5hX8TuffEMSSKQKE81apF63R+F39GPMRkGmDHFaIBKuTfsfu oINVSg94tMtFZStHPgg+LA1cZI/7Qc/XGx1al3IGTZoTfKSGxhFdifC4655wPDKQZ054 OyLkPYsywTCO+ebxZfsGZ0sxxR/1q0ML3OuLrHrCOUt+bs6iuw7aat3Kkb6ixQ2Il4Co KsJWdIfhRN8tubOXt9rBw/MGgdQoNyXD5axkjEuXVMrpkT30c4QdGF6R+5UisMRa2umJ cNlCERQUrtV4yGz/9VJAs0JUYbEfNdUzwFWt1mWzQkxbzhUOP8WqQpHdvL04/QwJODzt EaMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-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 r3si7213020plb.14.2019.07.12.02.14.10; Fri, 12 Jul 2019 02:14:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726138AbfGLJOK (ORCPT + 3 others); Fri, 12 Jul 2019 05:14:10 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:40649 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726025AbfGLJOK (ORCPT ); Fri, 12 Jul 2019 05:14:10 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1N1fei-1iRkwp00C0-0123fC; Fri, 12 Jul 2019 11:13:59 +0200 From: Arnd Bergmann To: Linus Walleij , Vinod Koul Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] dma: ste_dma40: fix unneeded variable warning Date: Fri, 12 Jul 2019 11:13:30 +0200 Message-Id: <20190712091357.744515-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:IqYlz58Jar5GCfS+BZKg5bdqodHpJJt/MRJG83qdyqbt2wfk7ay jgv77Bskqmv+zThYp5kQxBEEFUeJK/7TEWSZWua867UbUso4FFhHQKnxPAM/k8dUhftd1aX y7qCx5kTs23ZNbzvo1LLw0T8py9EL/oY97aciP7U+nRyTwDquP+Q3p4UaA05YRQuw1y8Kge hBQ0KI5XLuPXrw1icvKAQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:6sMZM3JYPV8=:jyJYAUc8zscanrU6pozE1G AX+FwJn88+Pr8mfWbhlSKByrpoMhzgLZCQYLOWr0kfZzOWog3drPLTiCLB1w80P7ooJSYjYs4 Q/r+AzrbR6rxiU165D24jzF8eRXYFFa40MctPdcGfVURNTGf1UMWxg5z5AXM4KfegjpbJTY5+ OPIF6md7cG9OA/ysWXOFLV1PQsndISFclli8Sl967GgvqSp9Znh+94EUaNHeWvEXLKEN0kygR CAgixXrKg/apAFlYh7wViBwKEy1Laxfds4HLQH8R52roaRnOqTUV51JUubf26QH78X/NsrtLB XNjW1HlYcf41tdHVnDj3QZDycjtEbdVA7qnfVDzi5WQATtIg32WC8WNSCobXgKXKdZrSugMF1 zzozNu/5LLK83os0EscPV+OYd29crmsV7myk/5kpZ79nONHb5eakWYLhGbmTXkJg2eFfdr9nu KRgmTtmChv5BscbncoZF/SZq11klmYDmzaxmNhumLqO03tMj3PVPQlfcbTbh5EVb4+srb24rl BKWrKgkoB868mZGy1L7Yc98QnjbkjxQx0GEQjeH+208gc/qogGi/yqNTex07RNhSu1akZL+r2 0kjgrM0lkGEFH7qj6uo500ZqYWnmX/LDbgSvOPOv6ghorjrW2HgdIzvFjDVFanpRB/993IYe1 LJZcifHQGymfvYOAKR0IUYyeuoqXMqd5rWrB9EbHJrBLR6Dkf39jFwIVPxynKNbnOnSnpl5z1 rJG1dNpLPukoJm1tg3QKCmoTAKqZ0a2X5H1/PA== Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org 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 --- drivers/dma/ste_dma40.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.0 Reviewed-by: Nathan Chancellor Reviewed-by: Linus Walleij diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 89d710899010..de8bfd9a76e9 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,