staging:rtl8192u: r8190_rtl8256.h - Style changes
cover staging:rtl8192u: r8190_rtl8256.h - Style changes
This is a simple checkpatch cleanup of the file r8190_rtl8256.h, mostly to clear CamelCase naming problems.
The directory contains a copying file which suggests GPL2.0 so that has been added as the missing SPDX-License-Identifier tag.
John Whitmore (6):
staging:rtl8192u: Rename PHY_SetRF8256Bandwidth() - Style staging:rtl8192u: Rename function PHY_RF8256_Config() - Style staging:rtl8192u: Refactor phy_RF8256_Config_ParaFile() - Style staging:rtl8192u: Rename PHY_SetRF8256CCKTxPower() - Style staging:rtl8192u: Rename PHY_SetRF8256OFDMTxPower() - Style staging:rtl8192u: Add SPDX-License-Identifier tag - Style
drivers/staging/rtl8192u/r8190_rtl8256.c | 27 ++++++++++++++---------- drivers/staging/rtl8192u/r8190_rtl8256.h | 11 +++++----- drivers/staging/rtl8192u/r819xU_phy.c | 14 ++++++------ 3 files changed, 29 insertions(+), 23 deletions(-)
Signature · 1 line
2.18.0
PATCH 1/6 staging:rtl8192u: Rename PHY_SetRF8256Bandwidth() - Style
Rename the function PHY_SetRF8256Bandwidth() to phy_set_rf8256_bandwidth(). This change clears the checkpatch issue with CamelCase naming.
The parameter Bandwidth has been renamed to bandwidth, for the same reason.
Additionally a new line has been added to the parameter list of the function declaration in r8190_rtl8256.h to truncate the line length to the checkpatch limit.
These changes are simple coding style changes which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r8190_rtl8256.c | 8 ++++---- drivers/staging/rtl8192u/r8190_rtl8256.h | 3 ++- drivers/staging/rtl8192u/r819xU_phy.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/r8190_rtl8256.c +4 -4
@@ -23,7 +23,7 @@* Note: 8226 support both 20M and 40 MHz *-------------------------------------------------------------------------- */ -void PHY_SetRF8256Bandwidth (struct net_device *dev,enum ht_channel_width Bandwidth) +void phy_set_rf8256_bandwidth (struct net_device *dev,enum ht_channel_width Bandwidth) {u8 eRFPath;struct r8192_priv *priv =ieee80211_priv (dev);
@@ -53,7 +53,7 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwi (enum rf90_radio_path_e )eRFPath, 0x14, bMask12Bits, 0x5ab); }else { -RT_TRACE (COMP_ERR ,"PHY_SetRF8256Bandwidth(): unknown hardware version\n" ); +RT_TRACE (COMP_ERR ,"phy_set_rf8256_bandwidth(): unknown hardware version\n" ); }break ;case HT_CHANNEL_WIDTH_20_40 :
@@ -68,11 +68,11 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwielse rtl8192_phy_SetRFReg (dev, (enum rf90_radio_path_e )eRFPath,0x14 , bMask12Bits,0x5ab ); }else { -RT_TRACE (COMP_ERR ,"PHY_SetRF8256Bandwidth(): unknown hardware version\n" ); +RT_TRACE (COMP_ERR ,"phy_set_rf8256_bandwidth(): unknown hardware version\n" ); }break ;default : -RT_TRACE (COMP_ERR ,"PHY_SetRF8256Bandwidth(): unknown Bandwidth: %#X\n" , Bandwidth); +RT_TRACE (COMP_ERR ,"phy_set_rf8256_bandwidth(): unknown Bandwidth: %#X\n" , Bandwidth);break ; }
drivers/staging/rtl8192u/r8190_rtl8256.h +2 -1
@@ -14,7 +14,8 @@#define RTL8225H #define RTL819X_TOTAL_RF_PATH 2/* for 8192U */ -void PHY_SetRF8256Bandwidth (struct net_device *dev,enum ht_channel_width Bandwidth); +void phy_set_rf8256_bandwidth (struct net_device *dev, +enum ht_channel_width bandwidth);void PHY_RF8256_Config (struct net_device *dev);void phy_RF8256_Config_ParaFile (struct net_device *dev);void PHY_SetRF8256CCKTxPower (struct net_device *dev,u8 powerlevel);
drivers/staging/rtl8192u/r819xU_phy.c +1 -1
@@ -1633,7 +1633,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)break ;case RF_8256 : -PHY_SetRF8256Bandwidth (dev, priv->CurrentChannelBW); +phy_set_rf8256_bandwidth (dev, priv->CurrentChannelBW);break ;case RF_8258 :
Signature · 1 line
2.18.0
PATCH 2/6 staging:rtl8192u: Rename function PHY_RF8256_Config() - Style
In reply to John WhitmoreRename the function PHY_RF8256_Config() to phy_rf8256_config(). This change clears the checkpatch issue with CamelCase naming.
This is a simple coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r8190_rtl8256.c | 4 ++-- drivers/staging/rtl8192u/r8190_rtl8256.h | 2 +- drivers/staging/rtl8192u/r819xU_phy.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/r8190_rtl8256.c +2 -2
@@ -85,7 +85,7 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width Band* Return: NONE *-------------------------------------------------------------------------- */ -void PHY_RF8256_Config (struct net_device *dev) +void phy_rf8256_config (struct net_device *dev) {struct r8192_priv *priv =ieee80211_priv (dev);/* Initialize general global value
@@ -152,7 +152,7 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev)* TODO: this function should be removed on ASIC , Emily 2007.2.2 */ if (rtl8192_phy_checkBBAndRF (dev,HW90_BLOCK_RF , (enum rf90_radio_path_e )eRFPath)) { -RT_TRACE (COMP_ERR ,"PHY_RF8256_Config():Check Radio[%d] Fail!!\n" , eRFPath); +RT_TRACE (COMP_ERR ,"phy_rf8256_config():Check Radio[%d] Fail!!\n" , eRFPath); goto phy_RF8256_Config_ParaFile_Fail; }
drivers/staging/rtl8192u/r8190_rtl8256.h +1 -1
@@ -16,7 +16,7 @@#define RTL819X_TOTAL_RF_PATH 2/* for 8192U */ void phy_set_rf8256_bandwidth (struct net_device *dev,enum ht_channel_width bandwidth); -void PHY_RF8256_Config (struct net_device *dev); +void phy_rf8256_config (struct net_device *dev);void phy_RF8256_Config_ParaFile (struct net_device *dev);void PHY_SetRF8256CCKTxPower (struct net_device *dev,u8 powerlevel);void PHY_SetRF8256OFDMTxPower (struct net_device *dev,u8 powerlevel);
drivers/staging/rtl8192u/r819xU_phy.c +2 -2
@@ -793,7 +793,7 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev) (enum rf90_radio_path_e)0);if (status !=0 ) {RT_TRACE ((COMP_ERR |COMP_PHY ), -"PHY_RF8256_Config(): Check PHY%d Fail!!\n" , +"phy_rf8256_config(): Check PHY%d Fail!!\n" , eCheckItem-1 );return ; }
@@ -940,7 +940,7 @@ void rtl8192_phy_RFConfig(struct net_device *dev)switch (priv->rf_chip) {case RF_8256 : -PHY_RF8256_Config (dev); +phy_rf8256_config (dev);break ;default :RT_TRACE (COMP_ERR ,"error chip id\n" );
Signature · 1 line
2.18.0
PATCH 3/6 staging:rtl8192u: Refactor phy_RF8256_Config_ParaFile() - Style
In reply to John WhitmoreRename the function phy_RF8256_Config_ParaFile() to phy_rf8256_config_para_file(). This change clears the checkpatch issue with CamelCase naming.
Additionally as the function is only ever used in one file, (r8190_rtl8256.c), the function prototype has been removed from the header file, (r8190_rtl8256.h).
These changes are purely coding style in nature and should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r8190_rtl8256.c | 11 ++++++++--- drivers/staging/rtl8192u/r8190_rtl8256.h | 1 - 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/r8190_rtl8256.c +8 -3
@@ -14,6 +14,11 @@#include "r819xU_phy.h" #include "r8190_rtl8256.h" +/* +* Forward declaration of local functions +*/ +static void phy_rf8256_config_para_file (struct net_device *dev); +/*-------------------------------------------------------------------------- * Overview: set RF band width (20M or 40M) * Input: struct net_device* dev
@@ -94,7 +99,7 @@ void phy_rf8256_config(struct net_device *dev)*/ priv->NumTotalRFPath =RTL819X_TOTAL_RF_PATH ;/* Config BB and RF */ -phy_RF8256_Config_ParaFile (dev); +phy_rf8256_config_para_file (dev); }/*-------------------------------------------------------------------------- * Overview: Interface to config 8256
@@ -103,7 +108,7 @@ void phy_rf8256_config(struct net_device *dev)* Return: NONE *-------------------------------------------------------------------------- */ -void phy_RF8256_Config_ParaFile (struct net_device *dev) +static void phy_rf8256_config_para_file (struct net_device *dev) {u32 u4RegValue =0 ;u8 eRFPath;
@@ -207,7 +212,7 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) }if (ret) { -RT_TRACE (COMP_ERR ,"phy_RF8256_Config_ParaFile():Radio[%d] Fail!!" , eRFPath); +RT_TRACE (COMP_ERR ,"phy_rf8256_config_para_file():Radio[%d] Fail!!" , eRFPath); goto phy_RF8256_Config_ParaFile_Fail; }
drivers/staging/rtl8192u/r8190_rtl8256.h +0 -1
@@ -17,7 +17,6 @@void phy_set_rf8256_bandwidth (struct net_device *dev,enum ht_channel_width bandwidth);void phy_rf8256_config (struct net_device *dev); -void phy_RF8256_Config_ParaFile (struct net_device *dev);void PHY_SetRF8256CCKTxPower (struct net_device *dev,u8 powerlevel);void PHY_SetRF8256OFDMTxPower (struct net_device *dev,u8 powerlevel);
Signature · 1 line
2.18.0
PATCH 4/6 staging:rtl8192u: Rename PHY_SetRF8256CCKTxPower() - Style
In reply to John WhitmoreRename the function PHY_SetRF8256CCKTxPower() to phy_set_rf8256_cck_tx_power(), to clear the checkpatch issue with CamelCase naming.
This is a purely coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r8190_rtl8256.c | 2 +- drivers/staging/rtl8192u/r8190_rtl8256.h | 2 +- drivers/staging/rtl8192u/r819xU_phy.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/r8190_rtl8256.c +1 -1
@@ -226,7 +226,7 @@ static void phy_rf8256_config_para_file(struct net_device *dev) } -void PHY_SetRF8256CCKTxPower (struct net_device *dev,u8 powerlevel) +void phy_set_rf8256_cck_tx_power (struct net_device *dev,u8 powerlevel) {u32 TxAGC =0 ;struct r8192_priv *priv =ieee80211_priv (dev);
drivers/staging/rtl8192u/r8190_rtl8256.h +1 -1
@@ -17,7 +17,7 @@void phy_set_rf8256_bandwidth (struct net_device *dev,enum ht_channel_width bandwidth);void phy_rf8256_config (struct net_device *dev); -void PHY_SetRF8256CCKTxPower (struct net_device *dev,u8 powerlevel); +void phy_set_rf8256_cck_tx_power (struct net_device *dev,u8 powerlevel);void PHY_SetRF8256OFDMTxPower (struct net_device *dev,u8 powerlevel);#endif
drivers/staging/rtl8192u/r819xU_phy.c +2 -2
@@ -917,7 +917,7 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel)switch (priv->rf_chip) {case RF_8256 :/* need further implement */ -PHY_SetRF8256CCKTxPower (dev, powerlevel); +phy_set_rf8256_cck_tx_power (dev, powerlevel);PHY_SetRF8256OFDMTxPower (dev, powerlevelOFDM24G);break ;default :
@@ -1065,7 +1065,7 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)break ;case RF_8256 : -PHY_SetRF8256CCKTxPower (dev, powerlevel); +phy_set_rf8256_cck_tx_power (dev, powerlevel);PHY_SetRF8256OFDMTxPower (dev, powerlevelOFDM24G);break ;
Signature · 1 line
2.18.0
PATCH 5/6 staging:rtl8192u: Rename PHY_SetRF8256OFDMTxPower() - Style
In reply to John WhitmoreRename function PHY_SetRF8256OFDMTxPower() to phy_set_rf8256_ofdm_tx_power(), to clear the checkpatch issue with CamelCase naming.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r8190_rtl8256.c | 2 +- drivers/staging/rtl8192u/r8190_rtl8256.h | 2 +- drivers/staging/rtl8192u/r819xU_phy.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/r8190_rtl8256.c +1 -1
@@ -245,7 +245,7 @@ void phy_set_rf8256_cck_tx_power(struct net_device *dev, u8 powerlevel) } -void PHY_SetRF8256OFDMTxPower (struct net_device *dev,u8 powerlevel) +void phy_set_rf8256_ofdm_tx_power (struct net_device *dev,u8 powerlevel) {struct r8192_priv *priv =ieee80211_priv (dev);/* Joseph TxPower for 8192 testing */
drivers/staging/rtl8192u/r8190_rtl8256.h +1 -1
@@ -18,6 +18,6 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width bandwidth);void phy_rf8256_config (struct net_device *dev);void phy_set_rf8256_cck_tx_power (struct net_device *dev,u8 powerlevel); -void PHY_SetRF8256OFDMTxPower (struct net_device *dev,u8 powerlevel); +void phy_set_rf8256_ofdm_tx_power (struct net_device *dev,u8 powerlevel);#endif
drivers/staging/rtl8192u/r819xU_phy.c +2 -2
@@ -918,7 +918,7 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel)case RF_8256 :/* need further implement */ phy_set_rf8256_cck_tx_power (dev, powerlevel); -PHY_SetRF8256OFDMTxPower (dev, powerlevelOFDM24G); +phy_set_rf8256_ofdm_tx_power (dev, powerlevelOFDM24G);break ;default : RT_TRACE((COMP_PHY|COMP_ERR),
@@ -1066,7 +1066,7 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)case RF_8256 :phy_set_rf8256_cck_tx_power (dev, powerlevel); -PHY_SetRF8256OFDMTxPower (dev, powerlevelOFDM24G); +phy_set_rf8256_ofdm_tx_power (dev, powerlevelOFDM24G);break ;case RF_8258 :
Signature · 1 line
2.18.0
PATCH 6/6 staging:rtl8192u: Add SPDX-License-Identifier tag - Style
In reply to John WhitmoreAdd the missing SPDX-License-Identifier tag to clear the checkpatch issue. This is a coding style change which should not impact runtime code execution.
--- drivers/staging/rtl8192u/r8190_rtl8256.h | 1 + 1 file changed, 1 insertion(+)
drivers/staging/rtl8192u/r8190_rtl8256.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * This is part of the rtl8180-sa2400 driver * released under the GPL (See file COPYING for details).
Signature · 1 line
2.18.0