From: Wei Yongjun <weiyongjun1@huawei.com>
To: <weiyongjun1@huawei.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
Liam Girdwood <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Vidya Sagar <vidyas@nvidia.com>,
Jingoo Han <jingoohan1@gmail.com>,
Dinghao Liu <dinghao.liu@zju.edu.cn>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-pci@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com>
Subject: [PATCH -next] PCI: tegra: Fix build warnings when CONFIG_PCIEASPM is not set
Date: Thu, 20 May 2021 13:42:09 +0000 [thread overview]
Message-ID: <20210520134209.1667244-1-weiyongjun1@huawei.com> (raw)
Fix build warning when CONFIG_PCIEASPM is not set:
drivers/pci/controller/dwc/pcie-tegra194.c:259:18: warning:
'event_cntr_data_offset' defined but not used [-Wunused-const-variable=]
259 | static const u32 event_cntr_data_offset[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pci/controller/dwc/pcie-tegra194.c:250:18: warning:
'event_cntr_ctrl_offset' defined but not used [-Wunused-const-variable=]
250 | static const u32 event_cntr_ctrl_offset[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pci/controller/dwc/pcie-tegra194.c:243:27: warning:
'pcie_gen_freq' defined but not used [-Wunused-const-variable=]
243 | static const unsigned int pcie_gen_freq[] = {
| ^~~~~~~~~~~~~
Fix it by only define then when CONFIG_PCIEASPM is set.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
index bafd2c6ab3c2..b80dd071e90d 100644
--- a/drivers/pci/controller/dwc/pcie-tegra194.c
+++ b/drivers/pci/controller/dwc/pcie-tegra194.c
@@ -240,6 +240,7 @@
#define EP_STATE_DISABLED 0
#define EP_STATE_ENABLED 1
+#if defined(CONFIG_PCIEASPM)
static const unsigned int pcie_gen_freq[] = {
GEN1_CORE_CLK_FREQ,
GEN2_CORE_CLK_FREQ,
@@ -264,6 +265,7 @@ static const u32 event_cntr_data_offset[] = {
0x1c8,
0x1dc
};
+#endif
struct tegra_pcie_dw {
struct device *dev;
next reply other threads:[~2021-05-20 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 13:42 Wei Yongjun [this message]
2021-05-20 13:50 ` [PATCH -next] PCI: tegra: Fix build warnings when CONFIG_PCIEASPM is not set Jon Hunter
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=20210520134209.1667244-1-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=bhelgaas@google.com \
--cc=broonie@kernel.org \
--cc=dinghao.liu@zju.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=hulkci@huawei.com \
--cc=jingoohan1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=vidyas@nvidia.com \
/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