xserver/hw/kdrive/chips chips.c,1.5,1.6 chipsdraw.c,1.5,1.6

Eric Anholt <xserver-commit-u7BhqnqprCWvj1b/[email protected]> Thu, 9 Jun 2005 16:22:56 -0700 (PDT)
Newsgroups gmane.comp.freedesktop.xserver.cvs
Message-ID <[email protected]>
Committed by: anholt

Update of /cvs/xserver/xserver/hw/kdrive/chips
In directory gabe:/tmp/cvs-serv11124/hw/kdrive/chips

Modified Files:
	chips.c chipsdraw.c 
Log Message:
Perform a warnings sweep on hw/kdrive.  A number of these were my fault,
but some come from others.


Index: chips.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/chips/chips.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- chips.c	9 Jun 2005 10:44:44 -0000	1.5
+++ chips.c	9 Jun 2005 23:22:54 -0000	1.6
@@ -30,14 +30,10 @@
 
 #undef CHIPS_DEBUG
 
-Bool
+static Bool
 chipsCardInit (KdCardInfo *card)
 {
-    int			k;
-    char		*pixels;
     ChipsCardInfo	*chipsc;
-    CARD8		r00, r01, r02;
-    CARD8		r39;
 
     chipsc = (ChipsCardInfo *) xalloc (sizeof (ChipsCardInfo));
     if (!chipsc)
@@ -61,14 +57,11 @@
     return TRUE;
 }
 
-Bool
+static Bool
 chipsScreenInit (KdScreenInfo *screen)
 {
-    ChipsCardInfo	*chipsc = screen->card->driver;
     ChipsScreenInfo	*chipss;
     int			screen_size, memory;
-    CARD32		mmio_base;
-    CARD32		mmio_size;
 
     chipss = (ChipsScreenInfo *) xalloc (sizeof (ChipsScreenInfo));
     if (!chipss)
@@ -126,7 +119,7 @@
     return TRUE;
 }
 
-Bool
+static Bool
 chipsInitScreen (ScreenPtr pScreen)
 {
     return vesaInitScreen (pScreen);
@@ -156,7 +149,7 @@
 }
 #endif
 
-Bool
+static Bool
 chipsFinishInitScreen (ScreenPtr pScreen)
 {
     Bool    ret;
@@ -189,7 +182,8 @@
     outb (value, 0x3d7);
 }
 
-CARD8
+#if 0
+static CARD8
 chipsReadFR (ChipsScreenInfo *chipss, CARD8 index)
 {
     CARD8 value;
@@ -198,14 +192,14 @@
     return value;
 }
 
-void
+static void
 chipsWriteFR (ChipsScreenInfo *chipss, CARD8 index, CARD8 value)
 {
     outb (index, 0x3d0);
     outb (value, 0x3d1);
 }
 
-CARD8
+static CARD8
 chipsReadSeq (ChipsScreenInfo *chipss, CARD8 index)
 {
     CARD8   value;
@@ -214,31 +208,31 @@
     return value;
 }
 
-void
+static void
 chipsWriteSeq (ChipsScreenInfo *chipss, CARD8 index, CARD8 value)
 {
     outb (index, 0x3c4);
     outb (value, 0x3c5);
 }
+#endif
 
-void
+static void
 chipsPreserve (KdCardInfo *card)
 {
-    ChipsCardInfo	*chipss = card->driver;
     vesaPreserve(card);
 }
 
-void
+static void
 chipsSetMMIO (ChipsCardInfo *chipsc)
 {
 }
 
-void
+static void
 chipsResetMMIO (ChipsCardInfo *chipsc)
 {
 }
 
-Bool
+static Bool
 chipsEnable (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
@@ -250,7 +244,8 @@
     return TRUE;
 }
 
-Bool
+#if 0
+static Bool
 chipsDPMS (ScreenPtr pScreen, int mode)
 {
     KdScreenPriv(pScreen);
@@ -264,14 +259,15 @@
     ErrorF ("flat panel XR52 0x%x\n", chipsReadXR (chipss, 0x52));
     return TRUE;
 }
+#endif
 
-void
+static void
 chipsDisable (ScreenPtr pScreen)
 {
     vesaDisable (pScreen);
 }
 
-void
+static void
 chipsRestore (KdCardInfo *card)
 {
     ChipsCardInfo	*chipsc = card->driver;
@@ -280,7 +276,7 @@
     vesaRestore (card);
 }
 
-void
+static void
 chipsScreenFini (KdScreenInfo *screen)
 {
     ChipsScreenInfo	*chipss = (ChipsScreenInfo *) screen->driver;
@@ -297,11 +293,9 @@
     screen->driver = 0;
 }
 
-void
+static void
 chipsCardFini (KdCardInfo *card)
 {
-    ChipsCardInfo	*chipsc = card->driver;
-
     vesaCardFini (card);
 }
 

Index: chipsdraw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/chips/chipsdraw.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- chipsdraw.c	9 Jun 2005 10:44:44 -0000	1.5
+++ chipsdraw.c	9 Jun 2005 23:22:54 -0000	1.6
@@ -160,13 +160,6 @@
     pixelStride = pScreenPriv->screen->fb[0].pixelStride;
 }
 
-static void
-chipsWaitMarker (ScreenPtr pScreen, int marker)
-{
-    chipsSet (pScreen);
-    chipsWaitIdle ();
-}
-
 #ifdef HIQV
 #define CHIPS_BR0	0x00	/* offset */
 #define CHIPS_BR1    	0x04	/* bg */
@@ -312,6 +305,13 @@
 #endif
 }
 
+static void
+chipsWaitMarker (ScreenPtr pScreen, int marker)
+{
+    chipsSet (pScreen);
+    chipsWaitIdle ();
+}
+
 static Bool
 chipsPrepareSolid (PixmapPtr	pPixmap,
 		   int		alu,