From: Oliver O'Halloran Date: Mon, 15 Jul 2019 08:56:11 +0000 (+1000) Subject: powerpc/eeh_sysfs: Remove double pci_dn lookup. X-Git-Tag: v5.6-rc1~63^2~70 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=758b423275f0738fa4d382057c03f3d45c12905d;p=users%2Fjedix%2Flinux-maple.git powerpc/eeh_sysfs: Remove double pci_dn lookup. In eeh_notify_resume_show() the pci_dn for the device is looked up once in the declaration block and then once after checking for a NULL eeh_dev. Remove the second lookup since it's pointless. Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Tested-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190715085612.8802-5-oohall@gmail.com --- diff --git a/arch/powerpc/kernel/eeh_sysfs.c b/arch/powerpc/kernel/eeh_sysfs.c index 64a6dd519bf6..a6638ea54797 100644 --- a/arch/powerpc/kernel/eeh_sysfs.c +++ b/arch/powerpc/kernel/eeh_sysfs.c @@ -86,7 +86,6 @@ static ssize_t eeh_notify_resume_show(struct device *dev, if (!edev || !edev->pe) return -ENODEV; - pdn = pci_get_pdn(pdev); return sprintf(buf, "%d\n", pdn->last_allow_rc); }