Message ID | 20200917071758.1915565-1-liushixin2@huawei.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | [-next] PCI: dwc: Remove set but not used variable | expand |
On Thu, Sep 17, 2020 at 12:55 AM Liu Shixin <liushixin2@huawei.com> wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/pci/controller/dwc/pci-dra7xx.c: In function 'dra7xx_pcie_establish_link': > drivers/pci/controller/dwc/pci-dra7xx.c:142:6: warning: unused variable 'exp_cap_off' > [-Wunused-variable] > > After 3af45d34d30c ("PCI: dwc: Centralize link gen setting"), variable 'exp_cap_off' > is never used. Remove it to avoid build warning. Already fixed in next. Rob
diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index 69cd43f74260..7bac7c54b2aa 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -139,7 +139,7 @@ static int dra7xx_pcie_establish_link(struct dw_pcie *pci) struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pci); struct device *dev = pci->dev; u32 reg; - u32 exp_cap_off = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); + dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); if (dw_pcie_link_up(pci)) { dev_err(dev, "link is already up\n");
Fixes gcc '-Wunused-but-set-variable' warning: drivers/pci/controller/dwc/pci-dra7xx.c: In function 'dra7xx_pcie_establish_link': drivers/pci/controller/dwc/pci-dra7xx.c:142:6: warning: unused variable 'exp_cap_off' [-Wunused-variable] After 3af45d34d30c ("PCI: dwc: Centralize link gen setting"), variable 'exp_cap_off' is never used. Remove it to avoid build warning. Signed-off-by: Liu Shixin <liushixin2@huawei.com> --- drivers/pci/controller/dwc/pci-dra7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)