[libvirt] [PATCH] virpci: Rename virPCIDevice{Bind, Unbind}FromStubWithOverride

Michal Privoznik posted 1 patch 4 years, 8 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/51f27ef789cfba7ede0516379549dfd666cc0c49.1566554187.git.mprivozn@redhat.com
src/util/virpci.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
[libvirt] [PATCH] virpci: Rename virPCIDevice{Bind, Unbind}FromStubWithOverride
Posted by Michal Privoznik 4 years, 8 months ago
After my previous patches we have virPCIDeviceBindToStub() and
virPCIDeviceUnbindFromStub() which really do nothing but call
virPCIDeviceBindToStubWithOverride() and
virPCIDeviceUnbindFromStubWithOverride() respectively.
Drop "WithOverride" from the names and drop the thin wrappers.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

Pushed under trivial rule.

 src/util/virpci.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index 6724a8ad9e..ee78151e74 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -1136,7 +1136,7 @@ virPCIDeviceBindWithDriverOverride(virPCIDevicePtr dev,
 }
 
 static int
-virPCIDeviceUnbindFromStubWithOverride(virPCIDevicePtr dev)
+virPCIDeviceUnbindFromStub(virPCIDevicePtr dev)
 {
     if (!dev->unbind_from_stub) {
         VIR_DEBUG("Unbind from stub skipped for PCI device %s", dev->name);
@@ -1147,13 +1147,7 @@ virPCIDeviceUnbindFromStubWithOverride(virPCIDevicePtr dev)
 }
 
 static int
-virPCIDeviceUnbindFromStub(virPCIDevicePtr dev)
-{
-    return virPCIDeviceUnbindFromStubWithOverride(dev);
-}
-
-static int
-virPCIDeviceBindToStubWithOverride(virPCIDevicePtr dev)
+virPCIDeviceBindToStub(virPCIDevicePtr dev)
 {
     const char *stubDriverName;
     VIR_AUTOFREE(char *) stubDriverPath = NULL;
@@ -1192,12 +1186,6 @@ virPCIDeviceBindToStubWithOverride(virPCIDevicePtr dev)
     return 0;
 }
 
-static int
-virPCIDeviceBindToStub(virPCIDevicePtr dev)
-{
-    return virPCIDeviceBindToStubWithOverride(dev);
-}
-
 /* virPCIDeviceDetach:
  *
  * Detach this device from the host driver, attach it to the stub
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list