Received: by 2002:a25:9388:0:0:0:0:0 with SMTP id a8csp7148395ybm; Thu, 13 Jun 2019 10:29:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4nt9CQGeC5RSNNxoIXPZx/fzccBZbJA0U++TA4myUCfO/OiqPMz82FimmTRTvQZdI4bdg X-Received: by 2002:a17:90a:5d15:: with SMTP id s21mr6515491pji.126.1560446982793; Thu, 13 Jun 2019 10:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560446982; cv=none; d=google.com; s=arc-20160816; b=de17k6xB46bRfezOo9GgQAVsHeicRKYADSRYeyaCT5slyHtn5xmj7fqZM1RYjmzkpL ZGvgHRI1Tg/xiNvNc6lIfQcImSSZuc2MP/Tnm5Crj038/zzPMJ94HRmz+T9gffQLJM0f dGAEVExFV6BRpQEbH3hTvaxk2HfFDBgdmSyYMx38uv3GVoIJUaYt2TlBiebfhsqnXW+i OtlQyYJ5dz/PNwgyRX+6KmLV+DBUJ1VflFOoQz+rs3G26MOcfmO0yLZrHlo9UIStUy3k thMqx1u9dB499NqMIA0o5uK9zxrpzrzT4UVy16a3n1iP9TB6JPhA3otKR2uVTR++SOBy rb/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=YOPSQyByy+sdwJPTHXHLAwPARdzuYkR92/UcWiG15z0=; b=DDtCF7YmYehHzDZQMsH/Ukof0putpV3LorHcVosOERoo27bjNvtJLlw7myQ5xzkvTF zhxF4svrV5WK9W07zUrUTBJTzE++qNoW8TGVJ2mvLxv+rxUbbN0NNZ02dRQ/tVR6FKlK ZZn/goleUIeZwuG99QAgd80ErIeY+z7GQCR/s7DkgWgTL3xM1Bnyj5RUUTt66RfHcxXZ E4iCf08uR4f4QBnt0yVgmrXrNc36sAExKtz376nPsoK2BSgEeARtJjj2Z2JCti6d+kHo W0D19356u2cPldgrDveoEBK0HDWdaOGHSxRWX45JA/UZF6AOhaPS5Ol5zrji5SpqFadh VsAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qq3Uulg+; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si272664pgj.252.2019.06.13.10.29.26; Thu, 13 Jun 2019 10:29:42 -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=@google.com header.s=20161025 header.b=qq3Uulg+; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728958AbfFMR2C (ORCPT + 99 others); Thu, 13 Jun 2019 13:28:02 -0400 Received: from mail-pf1-f202.google.com ([209.85.210.202]:48691 "EHLO mail-pf1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727230AbfFMR2C (ORCPT ); Thu, 13 Jun 2019 13:28:02 -0400 Received: by mail-pf1-f202.google.com with SMTP id u21so11809595pfn.15 for ; Thu, 13 Jun 2019 10:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=YOPSQyByy+sdwJPTHXHLAwPARdzuYkR92/UcWiG15z0=; b=qq3Uulg+GNz9qGof5VZ8h8QdhcjR1EeS0zo/SjjfeovzkY3ZDAWYtLBxpGrSALoW9x YzPJuHqkfuX1ogcyu8AnpJT3bDQEmsxTojWbxsmDcE+HPCNWeSCyI1TkHMMMwv7ZM7B5 xoOA8s2uBXemEdGeVyvWVr//eGffvPTa+1URylcVc5w9gIe3CDwV4cV4jX7UN2ZvvGTn kIynhzJdDc5gDcy2e28ddL0gz5sQnmlJYNUlz6m99/a3hJudaV8g0j8WuoAa9A5hWbUN FRrh9Bfj3Rw2zyzEoizIgUfOSz4BVBYFsc9Rzwd8pBcxZ0Hs0luZjMzXnRvBboZixHsR FUhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=YOPSQyByy+sdwJPTHXHLAwPARdzuYkR92/UcWiG15z0=; b=XQXy+yqrjsCMqvc0PkKhpRC9njwxRvd3ESvyB0WqDoD2Rug9V+0xDk44NM6d8O18hq Mjlw0kMlBgqDgG5ywc62WsvHb6MgBcqCxciejtgHT479LZ5BKAl7cDh4MClUlTvAG7Fu ZELnaaIxfj/MEYIY85xGTTTVQisDRBGzaZ5BO2ONVCktqrkv0kfcRYNMTOXL2Y8G6tPA /pKJmcMJTu+YvP5BnERO7s2Hc9NKUT9i7Zeyy+UKhtT03jyoblJ9AD819U9FRX9CDwTQ 2vwtP/NsHush69xuYl/IfOKlYyO+1BZbDTCZjDX/sAUUvu7c2CZUJ4czfPkakm/DVxO2 R9gg== X-Gm-Message-State: APjAAAUkcKmLS68kW25kmpUqmng7n6vD36ist7OqJmF5Q1vBIzHKtT31 5JdXuuBWF5HvIi2G2acURFJI16xATg== X-Received: by 2002:a63:5c15:: with SMTP id q21mr17864740pgb.248.1560446881379; Thu, 13 Jun 2019 10:28:01 -0700 (PDT) Date: Thu, 13 Jun 2019 10:27:46 -0700 Message-Id: <20190613172746.216819-1-nhuck@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.rc2.383.gf4fbbf30c2-goog Subject: [PATCH] memory: tegra: Fix -Wunused-const-variable From: Nathan Huckleberry To: thierry.reding@gmail.com, jonathanh@nvidia.com Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Huckleberry , clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang produces the following warning drivers/memory/tegra/tegra124.c:36:28: warning: unused variable 'tegra124_mc_emem_regs' [-Wunused-const-variable] static const unsigned long tegra124_mc_emem_regs[] = { ^ The only usage of this variable is from within an ifdef. It seems logical to move the variable into the ifdef as well. Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/526 Signed-off-by: Nathan Huckleberry --- drivers/memory/tegra/tegra124.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/memory/tegra/tegra124.c b/drivers/memory/tegra/tegra124.c index 8f8487bda642..8f2af5614595 100644 --- a/drivers/memory/tegra/tegra124.c +++ b/drivers/memory/tegra/tegra124.c @@ -33,6 +33,7 @@ #define MC_EMEM_ARB_MISC1 0xdc #define MC_EMEM_ARB_RING1_THROTTLE 0xe0 +#ifdef CONFIG_ARCH_TEGRA_124_SOC static const unsigned long tegra124_mc_emem_regs[] = { MC_EMEM_ARB_CFG, MC_EMEM_ARB_OUTSTANDING_REQ, @@ -54,6 +55,7 @@ static const unsigned long tegra124_mc_emem_regs[] = { MC_EMEM_ARB_MISC1, MC_EMEM_ARB_RING1_THROTTLE }; +#endif static const struct tegra_mc_client tegra124_mc_clients[] = { { -- 2.22.0.rc2.383.gf4fbbf30c2-goog