Re: [PATCH 6/8] PCI: Use pci_physfn() rather than looking up physfn by hand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 17, 2015 at 04:32:32PM -0500, Bjorn Helgaas wrote:
> Use the pci_physfn() helper rather than looking up physfn by hand.
> No functional change.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> ---
>  drivers/pci/ats.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c
> index fe59182..c35de8e 100644
> --- a/drivers/pci/ats.c
> +++ b/drivers/pci/ats.c
> @@ -53,9 +53,7 @@ int pci_enable_ats(struct pci_dev *dev, int ps)
>  
>  	ctrl = PCI_ATS_CTRL_ENABLE;
>  	if (dev->is_virtfn) {
> -		struct pci_dev *pdev = dev->physfn;
> -
> -		if (pdev->ats_stu != ps)
> +		if (pci_physfn(dev)->ats_stu != ps)
>  			return -EINVAL;
>  	} else {
>  		dev->ats_stu = ps;

Reviewed-by: Joerg Roedel <jroedel@xxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux