From b379d385bbaa88971587e309b9428315ebcfee46 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Fri, 21 Jul 2017 09:26:06 +0800 Subject: PCI: hisi: Remove unused variable driver The local "driver" variable was unused and caused a warning, so remove it: drivers/pci/dwc/pcie-hisi.c: In function 'hisi_pcie_probe': drivers/pci/dwc/pcie-hisi.c:271:24: warning: variable 'driver' set but not used [-Wunused-but-set-variable] Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Acked-by: Zhou Wang Acked-by: Gabriele Paoloni --- drivers/pci/dwc/pcie-hisi.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/pci') diff --git a/drivers/pci/dwc/pcie-hisi.c b/drivers/pci/dwc/pcie-hisi.c index e51acee0ddf3..6631654f95a5 100644 --- a/drivers/pci/dwc/pcie-hisi.c +++ b/drivers/pci/dwc/pcie-hisi.c @@ -268,7 +268,6 @@ static int hisi_pcie_probe(struct platform_device *pdev) struct dw_pcie *pci; struct hisi_pcie *hisi_pcie; struct resource *reg; - struct device_driver *driver; int ret; hisi_pcie = devm_kzalloc(dev, sizeof(*hisi_pcie), GFP_KERNEL); @@ -282,8 +281,6 @@ static int hisi_pcie_probe(struct platform_device *pdev) pci->dev = dev; pci->ops = &dw_pcie_ops; - driver = dev->driver; - hisi_pcie->pci = pci; hisi_pcie->soc_ops = of_device_get_match_data(dev); -- cgit v1.2.3-59-g8ed1b From 5a47516801893846b36cfc63600b4ccc1808f3ba Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Wed, 9 Aug 2017 13:18:48 +0530 Subject: PCI: hisi: Constify dw_pcie_host_ops structure Make this structure const as it is only stored in the ops field of a pcie_port structure, which is of type const. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Bjorn Helgaas --- drivers/pci/dwc/pcie-hisi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/pci') diff --git a/drivers/pci/dwc/pcie-hisi.c b/drivers/pci/dwc/pcie-hisi.c index 6631654f95a5..a20179169e06 100644 --- a/drivers/pci/dwc/pcie-hisi.c +++ b/drivers/pci/dwc/pcie-hisi.c @@ -223,7 +223,7 @@ static int hisi_pcie_link_up(struct dw_pcie *pci) return hisi_pcie->soc_ops->hisi_pcie_link_up(hisi_pcie); } -static struct dw_pcie_host_ops hisi_pcie_host_ops = { +static const struct dw_pcie_host_ops hisi_pcie_host_ops = { .rd_own_conf = hisi_pcie_cfg_read, .wr_own_conf = hisi_pcie_cfg_write, }; -- cgit v1.2.3-59-g8ed1b