Skip to content

Commit 26afdd9

Browse files
committed
vfio: Cleanup allowed driver naming
No functional change, avoid non-inclusive naming schemes. Signed-off-by: Alex Williamson <[email protected]>
1 parent 92ed301 commit 26afdd9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

drivers/vfio/vfio.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,10 @@ static struct vfio_device *vfio_group_get_device(struct vfio_group *group,
627627
* that error notification via MSI can be affected for platforms that handle
628628
* MSI within the same IOVA space as DMA.
629629
*/
630-
static const char * const vfio_driver_whitelist[] = { "pci-stub" };
630+
static const char * const vfio_driver_allowed[] = { "pci-stub" };
631631

632-
static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv)
632+
static bool vfio_dev_driver_allowed(struct device *dev,
633+
struct device_driver *drv)
633634
{
634635
if (dev_is_pci(dev)) {
635636
struct pci_dev *pdev = to_pci_dev(dev);
@@ -638,8 +639,8 @@ static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv)
638639
return true;
639640
}
640641

641-
return match_string(vfio_driver_whitelist,
642-
ARRAY_SIZE(vfio_driver_whitelist),
642+
return match_string(vfio_driver_allowed,
643+
ARRAY_SIZE(vfio_driver_allowed),
643644
drv->name) >= 0;
644645
}
645646

@@ -648,7 +649,7 @@ static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv)
648649
* one of the following states:
649650
* - driver-less
650651
* - bound to a vfio driver
651-
* - bound to a whitelisted driver
652+
* - bound to an otherwise allowed driver
652653
* - a PCI interconnect device
653654
*
654655
* We use two methods to determine whether a device is bound to a vfio
@@ -674,7 +675,7 @@ static int vfio_dev_viable(struct device *dev, void *data)
674675
}
675676
mutex_unlock(&group->unbound_lock);
676677

677-
if (!ret || !drv || vfio_dev_whitelisted(dev, drv))
678+
if (!ret || !drv || vfio_dev_driver_allowed(dev, drv))
678679
return 0;
679680

680681
device = vfio_group_get_device(group, dev);

0 commit comments

Comments
 (0)