[PATCH 4/5] powerpc/eeh_sysfs: Remove double pci_dn lookup.

Sam Bobroff sbobroff at linux.ibm.com
Tue Jul 16 13:55:22 AEST 2019


On Mon, Jul 15, 2019 at 06:56:11PM +1000, Oliver O'Halloran wrote:
> 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 <oohall at gmail.com>

Reviewed-by: Sam Bobroff <sbobroff at linux.ibm.com>
Tested-by: Sam Bobroff <sbobroff at linux.ibm.com>

> ---
>  arch/powerpc/kernel/eeh_sysfs.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/eeh_sysfs.c b/arch/powerpc/kernel/eeh_sysfs.c
> index 3adf8cd..c4cc8fc 100644
> --- a/arch/powerpc/kernel/eeh_sysfs.c
> +++ b/arch/powerpc/kernel/eeh_sysfs.c
> @@ -102,7 +102,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);
>  }
>  
> -- 
> 2.9.5
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190716/0e11517b/attachment.sig>


More information about the Linuxppc-dev mailing list