[PATCH] drivers/net/sk98lin/skge.c: make SkPciWriteCfgDWord() a static inline
authorAdrian Bunk <bunk@stusta.de>
Fri, 11 Nov 2005 19:44:21 +0000 (20:44 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 16 Nov 2005 19:13:20 +0000 (14:13 -0500)
No external user and that small - such a function should be static
inline and not a global function.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/sk98lin/h/skvpd.h
drivers/net/sk98lin/skge.c

index bdc1a5eaaae9610533bcbffaffeecd83a01f425d..daa9a8d154fca28f3c23ae824a24c10415094093 100644 (file)
@@ -130,14 +130,12 @@ typedef   struct s_vpd_key {
 #ifndef VPD_DO_IO
 #define VPD_OUT8(pAC,IoC,Addr,Val)     (void)SkPciWriteCfgByte(pAC,Addr,Val)
 #define VPD_OUT16(pAC,IoC,Addr,Val)    (void)SkPciWriteCfgWord(pAC,Addr,Val)
-#define VPD_OUT32(pAC,IoC,Addr,Val)    (void)SkPciWriteCfgDWord(pAC,Addr,Val)
 #define VPD_IN8(pAC,IoC,Addr,pVal)     (void)SkPciReadCfgByte(pAC,Addr,pVal)
 #define VPD_IN16(pAC,IoC,Addr,pVal)    (void)SkPciReadCfgWord(pAC,Addr,pVal)
 #define VPD_IN32(pAC,IoC,Addr,pVal)    (void)SkPciReadCfgDWord(pAC,Addr,pVal)
 #else  /* VPD_DO_IO */
 #define VPD_OUT8(pAC,IoC,Addr,Val)     SK_OUT8(IoC,PCI_C(Addr),Val)
 #define VPD_OUT16(pAC,IoC,Addr,Val)    SK_OUT16(IoC,PCI_C(Addr),Val)
-#define VPD_OUT32(pAC,IoC,Addr,Val)    SK_OUT32(IoC,PCI_C(Addr),Val)
 #define VPD_IN8(pAC,IoC,Addr,pVal)     SK_IN8(IoC,PCI_C(Addr),pVal)
 #define VPD_IN16(pAC,IoC,Addr,pVal)    SK_IN16(IoC,PCI_C(Addr),pVal)
 #define VPD_IN32(pAC,IoC,Addr,pVal)    SK_IN32(IoC,PCI_C(Addr),pVal)
@@ -155,12 +153,6 @@ typedef    struct s_vpd_key {
                else                                            \
                        SK_OUT16(pAC,PCI_C(Addr),Val);          \
                }
-#define VPD_OUT32(pAC,Ioc,Addr,Val) {                  \
-               if ((pAC)->DgT.DgUseCfgCycle)                   \
-                       SkPciWriteCfgDWord(pAC,Addr,Val);       \
-               else                                            \
-                       SK_OUT32(pAC,PCI_C(Addr),Val);          \
-               }
 #define VPD_IN8(pAC,Ioc,Addr,pVal) {                   \
                if ((pAC)->DgT.DgUseCfgCycle)                   \
                        SkPciReadCfgByte(pAC,Addr,pVal);        \
index b18c92cb629e8a34ee95888f0ecd8498eacddf6a..08906ef3ff7e9403c6f99b5e6eb4ed1d7695a679 100644 (file)
@@ -277,6 +277,27 @@ extern  struct ethtool_ops SkGeEthtoolOps;
 static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}};
 static uintptr_t RxQueueAddr[SK_MAX_MACS] = {0x400, 0x480};
 
+/*****************************************************************************
+ *
+ *     SkPciWriteCfgDWord - write a 32 bit value to pci config space
+ *
+ * Description:
+ *     This routine writes a 32 bit value to the pci configuration
+ *     space.
+ *
+ * Returns:
+ *     0 - indicate everything worked ok.
+ *     != 0 - error indication
+ */
+static inline int SkPciWriteCfgDWord(
+SK_AC *pAC,    /* Adapter Control structure pointer */
+int PciAddr,           /* PCI register address */
+SK_U32 Val)            /* pointer to store the read value */
+{
+       pci_write_config_dword(pAC->PciDev, PciAddr, Val);
+       return(0);
+} /* SkPciWriteCfgDWord */
+
 /*****************************************************************************
  *
  *     SkGeInitPCI - Init the PCI resources
@@ -4083,28 +4104,6 @@ SK_U8 *pVal)             /* pointer to store the read value */
 } /* SkPciReadCfgByte */
 
 
-/*****************************************************************************
- *
- *     SkPciWriteCfgDWord - write a 32 bit value to pci config space
- *
- * Description:
- *     This routine writes a 32 bit value to the pci configuration
- *     space.
- *
- * Returns:
- *     0 - indicate everything worked ok.
- *     != 0 - error indication
- */
-int SkPciWriteCfgDWord(
-SK_AC *pAC,    /* Adapter Control structure pointer */
-int PciAddr,           /* PCI register address */
-SK_U32 Val)            /* pointer to store the read value */
-{
-       pci_write_config_dword(pAC->PciDev, PciAddr, Val);
-       return(0);
-} /* SkPciWriteCfgDWord */
-
-
 /*****************************************************************************
  *
  *     SkPciWriteCfgWord - write a 16 bit value to pci config space
This page took 0.02827 seconds and 5 git commands to generate.