staging: rtl8192u: make in r819xU_phy.c some local functions static
authorAna Rey <anarey@gmail.com>
Fri, 14 Mar 2014 17:59:58 +0000 (18:59 +0100)
committerPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Mon, 17 Mar 2014 01:39:08 +0000 (18:39 -0700)
Make some local functions static and fix coding style in these function
declarations when It is necessary

These are the local functions that were made static:
rtl8192_CalculateBitShift, rtl8192_phy_RFSerialRead,
rtl8192_phy_RFSerialWrite, rtl8192_InitBBRFRegDef,
rtl8192_BB_Config_ParaFile,rtl8192_SetTxPowerLevel,
rtl8192_phy_SetSwChnlCmdArray, rtl8192_phy_SwChnlStepByStep,
rtl8192_phy_FinishSwChnlNow

Fixed the following sparse warnings in r819xU_phy.c

drivers/staging/rtl8192u/r819xU_phy.c:47:5: warning: symbol 'rtl8192_CalculateBitShift' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:147:5: warning: symbol 'rtl8192_phy_RFSerialRead' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:232:6: warning: symbol 'rtl8192_phy_RFSerialWrite' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:574:6: warning: symbol 'rtl8192_InitBBRFRegDef' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:783:6: warning: symbol 'rtl8192_BB_Config_ParaFile' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:1073:6: warning: symbol 'rtl8192_SetTxPowerLevel' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:1242:4: warning: symbol 'rtl8192_phy_SetSwChnlCmdArray' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:1279:4: warning: symbol 'rtl8192_phy_SwChnlStepByStep' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_phy.c:1436:6: warning: symbol 'rtl8192_phy_FinishSwChnlNow' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
drivers/staging/rtl8192u/r819xU_phy.c

index 39cd426..b9f3531 100644 (file)
@@ -44,7 +44,7 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = {
  * output:   none
  * return:   u32       return the shift bit position of the mask
  ******************************************************************************/
-u32 rtl8192_CalculateBitShift(u32 bitmask)
+static u32 rtl8192_CalculateBitShift(u32 bitmask)
 {
        u32 i;
 
@@ -144,8 +144,8 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
  *            Driver here need to implement (1) and (2)
  *            ---need more spec for this information.
  ******************************************************************************/
-u32 rtl8192_phy_RFSerialRead(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
-                            u32 offset)
+static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,
+                                   RF90_RADIO_PATH_E eRFPath, u32 offset)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        u32 ret = 0;
@@ -229,8 +229,9 @@ u32 rtl8192_phy_RFSerialRead(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
  * Reg_Mode2   1               1                       Reg 31 ~ 45(0x1 ~ 0xf)
  * ---------------------------------------------------------------------------
  *****************************************************************************/
-void rtl8192_phy_RFSerialWrite(struct net_device *dev,
-                              RF90_RADIO_PATH_E eRFPath, u32 offset, u32 data)
+static void rtl8192_phy_RFSerialWrite(struct net_device *dev,
+                                     RF90_RADIO_PATH_E eRFPath, u32 offset,
+                                     u32 data)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        u32 DataAndAddr = 0, new_offset = 0;
@@ -571,7 +572,7 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
  * notice:    Initialization value here is constant and it should never
  *            be changed
  *****************************************************************************/
-void rtl8192_InitBBRFRegDef(struct net_device *dev)
+static void rtl8192_InitBBRFRegDef(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
 
@@ -780,7 +781,7 @@ u8 rtl8192_phy_checkBBAndRF(struct net_device *dev, HW90_BLOCK_E CheckBlock,
  * notice:    Initialization value may change all the time, so please make
  *            sure it has been synced with the newest.
  ******************************************************************************/
-void rtl8192_BB_Config_ParaFile(struct net_device *dev)
+static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        u8 reg_u8 = 0, eCheckItem = 0, status = 0;
@@ -1070,7 +1071,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
  * return:    none
  * notice:
  ******************************************************************************/
-void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
+static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        u8      powerlevel = priv->TxPowerLevelCCK[channel-1];
@@ -1239,9 +1240,9 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
  * return:    true if finished, false otherwise
  * notice:
  ******************************************************************************/
-u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
-                                u32 CmdTableSz, SwChnlCmdID CmdID, u32 Para1,
-                                u32 Para2, u32 msDelay)
+static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
+                                       u32 CmdTableSz, SwChnlCmdID CmdID,
+                                       u32 Para1, u32 Para2, u32 msDelay)
 {
        SwChnlCmd *pCmd;
 
@@ -1276,8 +1277,8 @@ u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
  * return:    true if finished, false otherwise
  * notice:    Wait for simpler function to replace it
  *****************************************************************************/
-u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8 *stage,
-                               u8 *step, u32 *delay)
+static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
+                                      u8 *stage, u8 *step, u32 *delay)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        SwChnlCmd       PreCommonCmd[MAX_PRECMD_CNT];
@@ -1433,7 +1434,7 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8 *stage,
  * return:    none
  * notice:    We should not call this function directly
  *****************************************************************************/
-void rtl8192_phy_FinishSwChnlNow(struct net_device *dev, u8 channel)
+static void rtl8192_phy_FinishSwChnlNow(struct net_device *dev, u8 channel)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        u32     delay = 0;