Message ID | 20210326190909.622369-1-colin.king@canonical.com |
---|---|
State | New |
Headers | show |
Series | PCI: endpoint: remove redundant initialization of pointer dev | expand |
Hi Colin, > The pointer dev is being initialized with a value that is > never read and it is being updated later with a new value. The > initialization is redundant and can be removed. [...] > - struct device *dev = epf->epc->dev.parent; > + struct device *dev; > struct pci_epf_bar *epf_bar; > struct pci_epc *epc; Thank you! Reviewed-by: Krzysztof Wilczyński <kw@linux.com> Krzysztof
On Fri, 26 Mar 2021 19:09:09 +0000, Colin King wrote: > The pointer dev is being initialized with a value that is > never read and it is being updated later with a new value. The > initialization is redundant and can be removed. Applied to pci/endpoint, thanks! [1/1] PCI: endpoint: Remove redundant initialization of pointer dev https://git.kernel.org/lpieralisi/pci/c/80c253bd7f Thanks, Lorenzo
diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c index 7646c8660d42..e9289d10f822 100644 --- a/drivers/pci/endpoint/pci-epf-core.c +++ b/drivers/pci/endpoint/pci-epf-core.c @@ -113,7 +113,7 @@ EXPORT_SYMBOL_GPL(pci_epf_bind); void pci_epf_free_space(struct pci_epf *epf, void *addr, enum pci_barno bar, enum pci_epc_interface_type type) { - struct device *dev = epf->epc->dev.parent; + struct device *dev; struct pci_epf_bar *epf_bar; struct pci_epc *epc;