[Spice-devel] [PATCH qxl-win v2 6/8] treewide: staticfy some functions, small indentation fixes

Alon Levy alevy at redhat.com
Mon Jun 20 05:37:06 PDT 2011


---
 display/driver.c  |    6 +++---
 display/res.c     |    8 ++++----
 display/surface.c |    6 +++---
 display/surface.h |    4 ----
 miniport/qxl.c    |    4 ++--
 5 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/display/driver.c b/display/driver.c
index 6bc0830..b452a4f 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -50,7 +50,7 @@ static DRVFN drv_calls[] = {
     {INDEX_DrvDisablePDEV, (PFN)DrvDisablePDEV},
     {INDEX_DrvCompletePDEV, (PFN)DrvCompletePDEV},
     {INDEX_DrvEnableSurface, (PFN)DrvEnableSurface},
-    {INDEX_DrvDisableSurface, (PFN) DrvDisableSurface},
+    {INDEX_DrvDisableSurface, (PFN)DrvDisableSurface},
     {INDEX_DrvAssertMode, (PFN)DrvAssertMode},
     {INDEX_DrvGetModes, (PFN)DrvGetModes},
     {INDEX_DrvSynchronize, (PFN)DrvSynchronize},
@@ -219,7 +219,7 @@ DEVINFO dev_default = {
     GCAPS2_ALPHACURSOR,
 };
 
-BOOL PrepareHardware(PDev *pdev);
+static BOOL PrepareHardware(PDev *pdev);
 
 static void mspace_print(void *user_data, char *format, ...)
 {
@@ -663,7 +663,7 @@ static BOOLEAN CreateVRamSlot(PDev *pdev)
 }
 
 
-BOOL PrepareHardware(PDev *pdev)
+static BOOL PrepareHardware(PDev *pdev)
 {
     VIDEO_MEMORY video_mem;
     VIDEO_MEMORY_INFORMATION video_mem_Info;
diff --git a/display/res.c b/display/res.c
index dd57491..8d4ae6e 100644
--- a/display/res.c
+++ b/display/res.c
@@ -558,10 +558,10 @@ void InitResources(PDev *pdev)
 
     if (global_res[id] == NULL) {
         global_res[id] = EngAllocMem(FL_ZERO_MEMORY, sizeof(DevRes), ALLOC_TAG);
-	pdev->Res = global_res[id];
+        pdev->Res = global_res[id];
         InitRes(pdev);
     } else {
-	pdev->Res = global_res[id];
+        pdev->Res = global_res[id];
     }
     EngReleaseSemaphore(res_sem);
 }
@@ -1408,14 +1408,14 @@ static CacheImage *AllocCacheImage(PDev* pdev)
 {
     RingItem *item;
     while (!(item = RingGetTail(pdev, &pdev->Res->cache_image_lru))) {
-	/* malloc_sem protects release_ring too */
+        /* malloc_sem protects release_ring too */
         EngAcquireSemaphore(pdev->Res->malloc_sem);
         if (pdev->Res->free_outputs == 0 &&
             SPICE_RING_IS_EMPTY(pdev->release_ring)) {
             WaitForReleaseRing(pdev);
         }
         FlushReleaseRing(pdev);
-	EngReleaseSemaphore(pdev->Res->malloc_sem);
+        EngReleaseSemaphore(pdev->Res->malloc_sem);
     }
     RingRemove(pdev, item);
     return CONTAINEROF(item, CacheImage, lru_link);
diff --git a/display/surface.c b/display/surface.c
index 7146b32..d6e1be3 100644
--- a/display/surface.c
+++ b/display/surface.c
@@ -40,8 +40,8 @@
 #include "res.h"
 #include "surface.h"
 
-BOOL CreateDrawArea(PDev *pdev, UINT8 *base_mem, ULONG format, UINT32 cx, UINT32 cy, UINT32 stride,
-                    UINT32 surface_id)
+static BOOL CreateDrawArea(PDev *pdev, UINT8 *base_mem, ULONG format, UINT32 cx, UINT32 cy,
+                           UINT32 stride, UINT32 surface_id)
 {
     SIZEL  size;
     DrawArea *drawarea;
@@ -74,7 +74,7 @@ error:
     return FALSE;
 }
 
-VOID FreeDrawArea(DrawArea *drawarea)
+static VOID FreeDrawArea(DrawArea *drawarea)
 {
     if (drawarea->surf_obj) {
         EngUnlockSurface(drawarea->surf_obj);
diff --git a/display/surface.h b/display/surface.h
index d741690..608696c 100644
--- a/display/surface.h
+++ b/display/surface.h
@@ -76,10 +76,6 @@ enum {
     DEVICE_BITMAP_ALLOCATION_TYPE_VRAM,
 };
 
-BOOL CreateDrawArea(PDev *pdev, UINT8 *base_mem, ULONG format, UINT32 cx, UINT32 cy, UINT32 stride,
-                    UINT32 surface_id);
-VOID FreeDrawArea(DrawArea *drawarea);
-
 HBITMAP CreateDeviceBitmap(PDev *pdev, SIZEL size, ULONG format, QXLPHYSICAL *phys_mem,
                            UINT8 **base_mem, UINT32 surface_id, UINT8 allocation_type);
 VOID DeleteDeviceBitmap(PDev *pdev, UINT32 surface_id, UINT8 allocation_type);
diff --git a/miniport/qxl.c b/miniport/qxl.c
index 855b08b..9d8ab36 100644
--- a/miniport/qxl.c
+++ b/miniport/qxl.c
@@ -204,7 +204,7 @@ VP_STATUS InitRom(QXLExtension *dev, PVIDEO_ACCESS_RANGE range)
                  __FUNCTION__, (ULONG)range->RangeStart.QuadPart, range->RangeLength));
     return NO_ERROR;
 
-    err:
+err:
     VideoPortUnmapMemory(dev, rom, NULL);
     DEBUG_PRINT((0, "%s ERR\n", __FUNCTION__));
     return error;
@@ -1005,7 +1005,7 @@ BOOLEAN StartIO(PVOID dev_extension, PVIDEO_REQUEST_PACKET packet)
     packet->StatusBlock->Status = NO_ERROR;
     DEBUG_PRINT((0, "%s: OK\n", __FUNCTION__));
     return TRUE;
-    err:
+err:
     packet->StatusBlock->Information = 0;
     packet->StatusBlock->Status = error;
     DEBUG_PRINT((0, "%s: ERR\n", __FUNCTION__));
-- 
1.7.5.4



More information about the Spice-devel mailing list