PCI: tegra: Fix build warnings when CONFIG_PCIEASPM is not set
Subsystems (4)
PATCH 1/1 PCI: tegra: Fix build warnings when CONFIG_PCIEASPM is not set
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 <[email protected]>
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +2 -0
@@ -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;
Jon Hunter
maintainerQuoted 15 lines · Wei Yongjun
Fix build warning when
CONFIG_PCIEASPMis 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[] = { | ^~~~~~~~~~~~~
Quoted 4 lines
Fix it by only define then when
CONFIG_PCIEASPMis set.Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>
Thanks but this has already been reported and there is a fix available [0].
Jon
[0]
https://patchwork.ozlabs.org/project/linux-tegra/patch/[email protected]/
Signature · 1 line
nvpublic