Re: [PATCH 1/2] PCI: make pci_dev_is_disconnected() helper public for other drivers

From: Ethan Zhao
Date: Wed Dec 13 2023 - 19:59:00 EST



On 12/13/2023 6:49 PM, Lukas Wunner wrote:
On Tue, Dec 12, 2023 at 10:46:36PM -0500, Ethan Zhao wrote:
move pci_dev_is_disconnected() from driver/pci/pci.h to public
include/linux/pci.h for other driver's reference.
no function change.
That's merely a prose description of the code. A reader can already
see from the code what it's doing. You need to explain the *reason*
for the change instead. E.g.: "Make pci_dev_is_disconnected() public
so that it can be called from $DRIVER to speed up hot removal
handling which may otherwise take seconds because of $REASONS."

Yup, why I made it public. then how about

"

Make pci_dev_is_disconnected() public so that it can be called from
Intel vt-d driver to check the device's hotplug removal state when
issue devTLB flush request."



Thanks,

Ethan


Thanks,

Lukas