staging: vt6556: Cleanup coding style: #define
Subsystems (2)
PATCH v5 1/4 staging: vt6556: Cleanup coding style: #define
This patch cleanup coding style issues on #defines.
Tested by compilation only.
---
Changes from V4:
- Splitted [PATCH V4 1/6] in 4 smaller patches
drivers/staging/vt6656/card.h | 6 +++--- drivers/staging/vt6656/device.h | 10 +++++----- drivers/staging/vt6656/main_usb.c | 18 +++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-)
drivers/staging/vt6656/card.h +3 -3
@@ -39,9 +39,9 @@ typedef enum _CARD_PHY_TYPE { PHY_TYPE_11A }CARD_PHY_TYPE , *PCARD_PHY_TYPE ; -#define CB_MAX_CHANNEL_24G 14 -#define CB_MAX_CHANNEL_5G 42/* add channel9(5045MHz), 41=>42 */ -#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G) +#define CB_MAX_CHANNEL_24G 14 +#define CB_MAX_CHANNEL_5G 42/* add channel9(5045MHz), 41=>42 */ +#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G + CB_MAX_CHANNEL_5G)struct vnt_private ;
drivers/staging/vt6656/device.h +5 -5
@@ -441,11 +441,11 @@ struct vnt_private {struct ieee80211_low_level_stats low_stats; }; -#define ADD_ONE_WITH_WRAP_AROUND (uVar, uModulo) { \ - if ((uVar) >= ((uModulo) - 1)) \ - (uVar) = 0; \ - else \ - (uVar)++; \ +#define ADD_ONE_WITH_WRAP_AROUND (uVar, uModulo) { \ + if ((uVar) >= ((uModulo) - 1)) \ + (uVar) = 0; \ + else \ + (uVar)++; \ }#define fMP_DISCONNECTED 0x00000002
drivers/staging/vt6656/main_usb.c +9 -9
@@ -75,18 +75,18 @@ MODULE_AUTHOR(DRIVER_AUTHOR);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION (DEVICE_FULL_DRV_NAM ); -#define DEVICE_PARAM (N ,D ) \ - static int N[MAX_UINTS]=OPTION_DEFAULT;\ - module_param_array(N, int, NULL, 0);\ - MODULE_PARM_DESC(N, D); +#define DEVICE_PARAM (N ,D ) \ + static int N[MAX_UINTS] = OPTION_DEFAULT; \ + module_param_array(N, int, NULL, 0); \ + MODULE_PARM_DESC(N, D) -#define RX_DESC_DEF0 64 -DEVICE_PARAM (RxDescriptors0,"Number of receive usb desc buffer" ); +#define RX_DESC_DEF0 64 +DEVICE_PARAM (RxDescriptors0,"Number of receive usb desc buffer" ); -#define TX_DESC_DEF0 64 -DEVICE_PARAM (TxDescriptors0,"Number of transmit usb desc buffer" ); +#define TX_DESC_DEF0 64 +DEVICE_PARAM (TxDescriptors0,"Number of transmit usb desc buffer" ); -#define CHANNEL_DEF 6 +#define CHANNEL_DEF 6DEVICE_PARAM (Channel,"Channel number" );/* PreambleType[] is the preamble length used for transmit.
Signature · 1 line
1.9.3
PATCH v5 2/4 staging: vt6556: Cleanup coding style: comments
This patch cleanup coding style issues on comments.
Tested by compilation only.
---
Changes from V4:
- Splitted [PATCH V4 1/6] in 4 smaller patches
drivers/staging/vt6656/baseband.c | 15 ++++++++------- drivers/staging/vt6656/card.c | 4 ++-- drivers/staging/vt6656/channel.c | 5 +++-- 3 files changed, 13 insertions(+), 11 deletions(-)
drivers/staging/vt6656/baseband.c +8 -7
@@ -26,9 +26,10 @@* Date: Jun. 5, 2002 * * Functions: -* vnt_get_frame_time - Calculate data frame transmitting time -* vnt_get_phy_field - Calculate PhyLength, PhyService and Phy Signal parameter for baseband Tx -* BBbVT3184Init - VIA VT3184 baseband chip init code +* vnt_get_frame_time - Calculate data frame transmitting time +* vnt_get_phy_field - Calculate PhyLength, PhyService and Phy +* Signal parameter for baseband Tx +* BBbVT3184Init - VIA VT3184 baseband chip init code * * Revision History: *
@@ -86,7 +87,7 @@ static u8 vnt_vt3184_al2230[] = {0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 /* 0xff */ }; -//{{RobertYu:20060515, new BB setting for VT3226D0 +/* {{RobertYu:20060515, new BB setting for VT3226D0 */ static u8 vnt_vt3184_vt3226d0[] = {0x31 ,0x00 ,0x00 ,0x00 ,0x00 ,0x80 ,0x00 ,0x00 , 0x70, 0x45, 0x2a, 0x76, 0x00, 0x00, 0x80, 0x00, /* 0x0f */
@@ -191,9 +192,9 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,* tx_rate - Tx Rate * Out: * struct vnt_phy_field *phy -* - pointer to Phy Length field -* - pointer to Phy Service field -* - pointer to Phy Signal field +* - pointer to Phy Length field +* - pointer to Phy Service field +* - pointer to Phy Signal field * * Return Value: none *
drivers/staging/vt6656/card.c +1 -1
@@ -55,8 +55,8 @@#include "key.h" #include "usbpipe.h" -//const u16 cwRXBCNTSFOff[MAX_RATE] -//{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; +/* const u16 cwRXBCNTSFOff[MAX_RATE] + {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; */ static const u16 cwRXBCNTSFOff[MAX_RATE] {192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3};
drivers/staging/vt6656/channel.c +3 -2
@@ -28,8 +28,9 @@* * * Revision History: -* 01-18-2005 RobertYu: remove the for loop searching in ChannelValid, -* change ChannelRuleTab to lookup-type, reorder table items. +* 01-18-2005 RobertYu: remove the for loop searching in +* ChannelValid, change ChannelRuleTab +* to lookup-type, reorder table items. * * */
Signature · 1 line
1.9.3
PATCH v5 3/4 staging: vt6556: Cleanup coding style: lines over 80 chars
In reply to Peter Senna TschudinThis patch cleanup the follwoing coding style issues:
- line over 80 chars
- spaces on the beginning of a line
- put { and } on the correct places
Tested by compilation only.
---
Changes from V4:
- Splitted [PATCH V4 1/6] in 4 smaller patches
drivers/staging/vt6656/baseband.c | 8 +++++--- drivers/staging/vt6656/card.c | 9 +++++---- drivers/staging/vt6656/main_usb.c | 5 +++-- 3 files changed, 13 insertions(+), 9 deletions(-)
drivers/staging/vt6656/baseband.c +5 -2
@@ -123,8 +123,9 @@ static u8 vnt_vt3184_vt3226d0[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0xff */ }; -static const u16 awcFrameTime[MAX_RATE] -{10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216}; +static const u16 awcFrameTime[MAX_RATE ] = { +10 ,20 ,55 ,110 ,24 ,36 ,48 ,72 ,96 ,144 ,192 ,216 +};/* * Description: Calculate data frame transmitting time
@@ -468,7 +469,8 @@ int BBbVT3184Init(struct vnt_private *priv) priv->ldBmThreshold[2 ] =0 ; priv->ldBmThreshold[3 ] =0 ;/* Fix VT3226 DFC system timing issue */ -vnt_mac_reg_bits_on (priv,MAC_REG_SOFTPWRCTL2 ,SOFTPWRCTL_RFLEOPT ); +vnt_mac_reg_bits_on (priv,MAC_REG_SOFTPWRCTL2 , +SOFTPWRCTL_RFLEOPT ); }else {return true; }
drivers/staging/vt6656/card.c +5 -3
@@ -58,8 +58,9 @@/* const u16 cwRXBCNTSFOff[MAX_RATE] {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; */ -static const u16 cwRXBCNTSFOff[MAX_RATE] -{192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3}; +static const u16 cwRXBCNTSFOff[MAX_RATE ] = { +192 ,96 ,34 ,17 ,34 ,23 ,17 ,11 ,8 ,5 ,4 ,3 +};/* * Description: Set NIC media channel
@@ -477,7 +478,7 @@ void vnt_update_top_rates(struct vnt_private *priv) } priv->byTopCCKBasicRate = top_cck; - } +}int vnt_ofdm_min_rate (struct vnt_private *priv) {
@@ -710,7 +711,7 @@ void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf, data[7 ] = (u8)(tsf >>56 );vnt_control_out (priv,MESSAGE_TYPE_SET_TSFTBTT , -MESSAGE_REQUEST_TBTT ,0 ,8 , data); +MESSAGE_REQUEST_TBTT ,0 ,8 , data);dev_dbg (&priv->usb->dev,"%s TBTT: %8llx\n" , __func__, tsf);
drivers/staging/vt6656/main_usb.c +3 -2
@@ -526,8 +526,9 @@ static void device_free_rx_bufs(struct vnt_private *priv)static void usb_device_reset (struct vnt_private *pDevice) { -int status; - status =usb_reset_device (pDevice->usb); +int status; + + status =usb_reset_device (pDevice->usb);if (status)printk ("usb_device_reset fail status=%d\n" ,status);return ;
Signature · 1 line
1.9.3
PATCH v5 4/4 staging: vt6556: Cleanup coding style: indentation
In reply to Peter Senna TschudinThis patch cleanup the follwoing coding style issues:
- indentation style
- new line after declaration
Tested by compilation only.
---
Changes from V4:
- Splitted [PATCH V4 1/6] in 4 smaller patches
drivers/staging/vt6656/main_usb.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/staging/vt6656/main_usb.c +18 -18
@@ -62,7 +62,7 @@#include "int.h" /* static int msglevel = MSG_LEVEL_DEBUG; */ -static int msglevel =MSG_LEVEL_INFO ; +static int msglevel =MSG_LEVEL_INFO ;/* * define module options
@@ -177,13 +177,12 @@ static struct usb_device_id vt6656_table[] = {/* frequency list (map channels to frequencies) */ /* static const long frequency_list[] = { -2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484, -4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, -5035, 5040, 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240, -5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680, -5700, 5745, 5765, 5785, 5805, 5825 -}; - +2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, +2472, 2484, 4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, 5035, 5040, +5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240, +5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, +5660, 5680, 5700, 5745, 5765, 5785, 5805, 5825 +}; */ static int vt6656_probe(struct usb_interface *intf,
@@ -206,16 +205,16 @@ static void usb_device_reset(struct vnt_private *pDevice);static void device_set_options (struct vnt_private *pDevice) { - pDevice->cbTD =TX_DESC_DEF0 ; - pDevice->cbRD =RX_DESC_DEF0 ; - pDevice->byShortRetryLimit =SHORT_RETRY_DEF ; - pDevice->byLongRetryLimit =LONG_RETRY_DEF ; - pDevice->op_mode =NL80211_IFTYPE_UNSPECIFIED ; - pDevice->byBBType =BBP_TYPE_DEF ; - pDevice->byPacketType = pDevice->byBBType; - pDevice->byAutoFBCtrl =AUTO_FB_0 ; - pDevice->byPreambleType =0 ; - pDevice->bExistSWNetAddr = false; + pDevice->cbTD =TX_DESC_DEF0 ; + pDevice->cbRD =RX_DESC_DEF0 ; + pDevice->byShortRetryLimit =SHORT_RETRY_DEF ; + pDevice->byLongRetryLimit =LONG_RETRY_DEF ; + pDevice->op_mode =NL80211_IFTYPE_UNSPECIFIED ; + pDevice->byBBType =BBP_TYPE_DEF ; + pDevice->byPacketType = pDevice->byBBType; + pDevice->byAutoFBCtrl =AUTO_FB_0 ; + pDevice->byPreambleType =0 ; + pDevice->bExistSWNetAddr = false; }/*
@@ -837,6 +836,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, u32 changed) {struct vnt_private *priv = hw->priv; + priv->current_aid = conf->aid;if (changed &BSS_CHANGED_BSSID )
Signature · 1 line
1.9.3