Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging/rtl8187se: Mark functions as static to silence sparse

Sparse complains that some functions can be declared as static:
123:6: warning: symbol 'PlatformIOWrite1Byte' was not declared. Should it be static?
129:6: warning: symbol 'PlatformIOWrite2Byte' was not declared. Should it be static?
135:6: warning: symbol 'PlatformIOWrite4Byte' was not declared. Should it be static?
178:6: warning: symbol 'SetOutputEnableOfRfPins' was not declared. Should it be static?
354:6: warning: symbol 'ZEBRA_Config_85BASIC_HardCode' was not declared. Should it be static?
655:6: warning: symbol 'InitTxPwrTracking87SE' was not declared. Should it be static?
665:6: warning: symbol 'PhyConfig8185' was not declared. Should it be static?
692:6: warning: symbol 'HwConfigureRTL8185' was not declared. Should it be static?
817:4: warning: symbol 'GetSupportedWirelessMode8185' was not declared. Should it be static?
822:6: warning: symbol 'ActUpdateChannelAccessSetting' was not declared. Should it be static?
857:6: warning: symbol 'ActSetWirelessMode8185' was not declared. Should it be static?
914:6: warning: symbol 'MgntDisconnectIBSS' was not declared. Should it be static?
940:6: warning: symbol 'MlmeDisassociateRequest' was not declared. Should it be static?
957:6: warning: symbol 'MgntDisconnectAP' was not declared. Should it be static?
975:6: warning: symbol 'MgntDisconnect' was not declared. Should it be static?
1011:6: warning: symbol 'SetRFPowerState' was not declared. Should it be static?
1115:6: warning: symbol 'InactivePowerSave' was not declared. Should it be static?

-> Add the static keyword.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Huewe and committed by
Greg Kroah-Hartman
b6592810 7f0cb0a0

+17 -17
+17 -17
drivers/staging/rtl8187se/r8185b_init.c
··· 120 120 return read_nic_byte(dev, offset); 121 121 } 122 122 123 - void PlatformIOWrite1Byte(struct net_device *dev, u32 offset, u8 data) 123 + static void PlatformIOWrite1Byte(struct net_device *dev, u32 offset, u8 data) 124 124 { 125 125 write_nic_byte(dev, offset, data); 126 126 read_nic_byte(dev, offset); /* To make sure write operation is completed, 2005.11.09, by rcnjko. */ 127 127 } 128 128 129 - void PlatformIOWrite2Byte(struct net_device *dev, u32 offset, u16 data) 129 + static void PlatformIOWrite2Byte(struct net_device *dev, u32 offset, u16 data) 130 130 { 131 131 write_nic_word(dev, offset, data); 132 132 read_nic_word(dev, offset); /* To make sure write operation is completed, 2005.11.09, by rcnjko. */ 133 133 } 134 134 135 - void PlatformIOWrite4Byte(struct net_device *dev, u32 offset, u32 data) 135 + static void PlatformIOWrite4Byte(struct net_device *dev, u32 offset, u32 data) 136 136 { 137 137 if (offset == PhyAddr) { 138 138 /* For Base Band configuration. */ ··· 175 175 } 176 176 } 177 177 178 - void SetOutputEnableOfRfPins(struct net_device *dev) 178 + static void SetOutputEnableOfRfPins(struct net_device *dev) 179 179 { 180 180 write_nic_word(dev, RFPinsEnable, 0x1bff); 181 181 } ··· 327 327 *-------------------------------------------------------------- 328 328 */ 329 329 330 - void ZEBRA_Config_85BASIC_HardCode(struct net_device *dev) 330 + static void ZEBRA_Config_85BASIC_HardCode(struct net_device *dev) 331 331 { 332 332 333 333 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); ··· 628 628 * Tx Power tracking mechanism routine on 87SE. 629 629 * Created by Roger, 2007.12.11. 630 630 */ 631 - void InitTxPwrTracking87SE(struct net_device *dev) 631 + static void InitTxPwrTracking87SE(struct net_device *dev) 632 632 { 633 633 u32 u4bRfReg; 634 634 ··· 638 638 RF_WriteReg(dev, 0x02, u4bRfReg|PWR_METER_EN); mdelay(1); 639 639 } 640 640 641 - void PhyConfig8185(struct net_device *dev) 641 + static void PhyConfig8185(struct net_device *dev) 642 642 { 643 643 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 644 644 write_nic_dword(dev, RCR, priv->ReceiveConfig); ··· 665 665 return; 666 666 } 667 667 668 - void HwConfigureRTL8185(struct net_device *dev) 668 + static void HwConfigureRTL8185(struct net_device *dev) 669 669 { 670 670 /* RTL8185_TODO: Determine Retrylimit, TxAGC, AutoRateFallback control. */ 671 671 u8 bUNIVERSAL_CONTROL_RL = 0; ··· 790 790 write_nic_byte(dev, 0x24E, 0x01); 791 791 } 792 792 793 - u8 GetSupportedWirelessMode8185(struct net_device *dev) 793 + static u8 GetSupportedWirelessMode8185(struct net_device *dev) 794 794 { 795 795 return WIRELESS_MODE_B | WIRELESS_MODE_G; 796 796 } 797 797 798 - void ActUpdateChannelAccessSetting(struct net_device *dev, 798 + static void ActUpdateChannelAccessSetting(struct net_device *dev, 799 799 WIRELESS_MODE WirelessMode, 800 800 PCHANNEL_ACCESS_SETTING ChnlAccessSetting) 801 801 { ··· 830 830 } 831 831 } 832 832 833 - void ActSetWirelessMode8185(struct net_device *dev, u8 btWirelessMode) 833 + static void ActSetWirelessMode8185(struct net_device *dev, u8 btWirelessMode) 834 834 { 835 835 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 836 836 struct ieee80211_device *ieee = priv->ieee80211; ··· 887 887 write_nic_dword(dev, IMR, priv->IntrMask); 888 888 } 889 889 890 - void MgntDisconnectIBSS(struct net_device *dev) 890 + static void MgntDisconnectIBSS(struct net_device *dev) 891 891 { 892 892 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 893 893 u8 i; ··· 913 913 notify_wx_assoc_event(priv->ieee80211); 914 914 } 915 915 916 - void MlmeDisassociateRequest(struct net_device *dev, u8 *asSta, u8 asRsn) 916 + static void MlmeDisassociateRequest(struct net_device *dev, u8 *asSta, u8 asRsn) 917 917 { 918 918 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 919 919 u8 i; ··· 930 930 } 931 931 } 932 932 933 - void MgntDisconnectAP(struct net_device *dev, u8 asRsn) 933 + static void MgntDisconnectAP(struct net_device *dev, u8 asRsn) 934 934 { 935 935 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 936 936 ··· 948 948 priv->ieee80211->state = IEEE80211_NOLINK; 949 949 } 950 950 951 - bool MgntDisconnect(struct net_device *dev, u8 asRsn) 951 + static bool MgntDisconnect(struct net_device *dev, u8 asRsn) 952 952 { 953 953 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 954 954 /* ··· 984 984 * Assumption: 985 985 * PASSIVE LEVEL. 986 986 */ 987 - bool SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState) 987 + static bool SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState) 988 988 { 989 989 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 990 990 bool bResult = false; ··· 1088 1088 return bActionAllowed; 1089 1089 } 1090 1090 1091 - void InactivePowerSave(struct net_device *dev) 1091 + static void InactivePowerSave(struct net_device *dev) 1092 1092 { 1093 1093 struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); 1094 1094 /*