[PATCH] server: Clean up VGA Arbiter macros.

Matthieu Herrb matthieu.herrb at laas.fr
Sat Jul 3 14:19:58 PDT 2010


Remove some extra semi-columns, un-used parameters, and wrap macros
that may be used as a simple statement  in a do {...} while (0) block.

Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
---
 hw/xfree86/common/xf86VGAarbiterPriv.h |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/hw/xfree86/common/xf86VGAarbiterPriv.h b/hw/xfree86/common/xf86VGAarbiterPriv.h
index 9b4a597..33d1d64 100644
--- a/hw/xfree86/common/xf86VGAarbiterPriv.h
+++ b/hw/xfree86/common/xf86VGAarbiterPriv.h
@@ -96,19 +96,21 @@
 #define GC_SCREEN register ScrnInfoPtr pScrn = \
     xf86Screens[pGC->pScreen->myNum]
 
-#define VGAGet(x)\
+#define VGAGet()\
+    do { \
     pci_device_vgaarb_set_target(xf86Screens[pScreen->myNum]->vgaDev); \
-    pci_device_vgaarb_lock();
+    pci_device_vgaarb_lock(); } while (0)
 
-#define VGAGet_GC(x)\
+#define VGAGet_GC()\
+    do { \
     pci_device_vgaarb_set_target(xf86Screens[pGC->pScreen->myNum]->vgaDev); \
-    pci_device_vgaarb_lock();
+    pci_device_vgaarb_lock(); } while (0)
 
-#define VGAPut(x)\
-    pci_device_vgaarb_unlock();
+#define VGAPut()\
+    pci_device_vgaarb_unlock()
 
-#define VGAPut_GC(x)\
-    pci_device_vgaarb_unlock();
+#define VGAPut_GC()\
+    pci_device_vgaarb_unlock()
 
 
 typedef struct _VGAarbiterScreen {
-- 
1.7.0.5


-- 
Matthieu Herrb


More information about the xorg-devel mailing list