linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfio: Cleanup allowed driver naming
@ 2020-06-18 19:57 Alex Williamson
  2020-06-19  7:18 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2020-06-18 19:57 UTC (permalink / raw)
  To: alex.williamson; +Cc: linux-kernel, kvm, cohuck

No functional change, avoid non-inclusive naming schemes.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 drivers/vfio/vfio.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 580099afeaff..833da937b7fc 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -627,9 +627,9 @@ static struct vfio_device *vfio_group_get_device(struct vfio_group *group,
  * that error notification via MSI can be affected for platforms that handle
  * MSI within the same IOVA space as DMA.
  */
-static const char * const vfio_driver_whitelist[] = { "pci-stub" };
+static const char * const vfio_driver_allowed[] = { "pci-stub" };
 
-static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv)
+static bool vfio_dev_driver_allowed(struct device *dev, struct device_driver *drv)
 {
 	if (dev_is_pci(dev)) {
 		struct pci_dev *pdev = to_pci_dev(dev);
@@ -638,8 +638,8 @@ static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv)
 			return true;
 	}
 
-	return match_string(vfio_driver_whitelist,
-			    ARRAY_SIZE(vfio_driver_whitelist),
+	return match_string(vfio_driver_allowed,
+			    ARRAY_SIZE(vfio_driver_allowed),
 			    drv->name) >= 0;
 }
 
@@ -648,7 +648,7 @@ static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv)
  * one of the following states:
  *  - driver-less
  *  - bound to a vfio driver
- *  - bound to a whitelisted driver
+ *  - bound to an otherwise allowed driver
  *  - a PCI interconnect device
  *
  * We use two methods to determine whether a device is bound to a vfio
@@ -674,7 +674,7 @@ static int vfio_dev_viable(struct device *dev, void *data)
 	}
 	mutex_unlock(&group->unbound_lock);
 
-	if (!ret || !drv || vfio_dev_whitelisted(dev, drv))
+	if (!ret || !drv || vfio_dev_driver_allowed(dev, drv))
 		return 0;
 
 	device = vfio_group_get_device(group, dev);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vfio: Cleanup allowed driver naming
  2020-06-18 19:57 [PATCH] vfio: Cleanup allowed driver naming Alex Williamson
@ 2020-06-19  7:18 ` Christoph Hellwig
  2020-06-19 13:16   ` Alex Williamson
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2020-06-19  7:18 UTC (permalink / raw)
  To: Alex Williamson; +Cc: linux-kernel, kvm, cohuck

On Thu, Jun 18, 2020 at 01:57:18PM -0600, Alex Williamson wrote:
> No functional change, avoid non-inclusive naming schemes.

Adding a bunch of overly long lines that don't change anything are
everything but an improvement.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vfio: Cleanup allowed driver naming
  2020-06-19  7:18 ` Christoph Hellwig
@ 2020-06-19 13:16   ` Alex Williamson
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2020-06-19 13:16 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-kernel, kvm, cohuck

On Fri, 19 Jun 2020 00:18:02 -0700
Christoph Hellwig <hch@infradead.org> wrote:

> On Thu, Jun 18, 2020 at 01:57:18PM -0600, Alex Williamson wrote:
> > No functional change, avoid non-inclusive naming schemes.  
> 
> Adding a bunch of overly long lines that don't change anything are
> everything but an improvement.

In fact, 3 of 5 code change lines are shorter, the other two are 3
characters longer each and arguably more descriptive.  One line does now
exceed 80 columns, though checkpatch no longer cares.  I'll send a v2
with that line wrapped.  Thanks,

Alex


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-19 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 19:57 [PATCH] vfio: Cleanup allowed driver naming Alex Williamson
2020-06-19  7:18 ` Christoph Hellwig
2020-06-19 13:16   ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).