Re: [PATCH V4 4/7] PCI: Unify try slot and bus reset API

Sinan Kaya
2018-07-02T20:40:10Z

On 6/29/2018 5:43 PM, Andy Shevchenko wrote:
>> +int pci_try_reset_bus(struct pci_dev *pdev)
>> +{
>> + bool slot = false;
>> +
>> + if (!pci_probe_reset_slot(pdev->slot))
>> + slot = true;
>> +
>> + return slot ? __pci_try_reset_slot(pdev->slot) :
>> + __pci_try_reset_bus(pdev->bus);
> This can be as simple as
>
> return pci_probe_reset_slot(pdev->slot) ?
> __pci_try_reset_bus(pdev->slot) : __pci_try_reset_slot(pdev->bus);
>
>

done

--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.