staging: wlags49_h2: wl_if.h: fixes tab indentation
PATCH 2/8 staging: wlags49_h2: wl_if.h: fixes tab indentation
This commit sorts out the tab & space indentation problems that were reported by the checkpatch.pl tool.
--- drivers/staging/wlags49_h2/wl_if.h | 70 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-)
drivers/staging/wlags49_h2/wl_if.h +35 -35
@@ -71,7 +71,7 @@#define MAX_LTV_BUF_SIZE (512 - (sizeof(hcf_16) * 2))#define HCF_TALLIES_SIZE (sizeof(CFG_HERMES_TALLIES_STRCT) + \ - (sizeof(hcf_16) * 2)) + (sizeof(hcf_16) * 2))#define HCF_MAX_MULTICAST 16#define HCF_MAX_NAME_LEN 32
@@ -176,57 +176,57 @@ UIL_FUN_PUT_INFO******************************************************************************/ typedef struct { -__u16 length; -__u8 name[HCF_MAX_NAME_LEN ]; +__u16 length; +__u8 name[HCF_MAX_NAME_LEN ]; }wvName_t ;typedef struct { -hcf_16 len; -hcf_16 typ; -union - { -hcf_8 u8[MAX_LTV_BUF_SIZE /sizeof (hcf_8)]; -hcf_16 u16[MAX_LTV_BUF_SIZE /sizeof (hcf_16)]; -hcf_32 u32[MAX_LTV_BUF_SIZE /sizeof (hcf_32)]; - } u; +hcf_16 len; +hcf_16 typ; +union + { +hcf_8 u8[MAX_LTV_BUF_SIZE /sizeof (hcf_8)]; +hcf_16 u16[MAX_LTV_BUF_SIZE /sizeof (hcf_16)]; +hcf_32 u32[MAX_LTV_BUF_SIZE /sizeof (hcf_32)]; + } u; }ltv_t ;struct uilreq { -union - { -char ifrn_name[IFNAMSIZ ]; - } ifr_ifrn; - -IFBP hcfCtx; -__u8 command; -__u8 result; - -/* The data field in this structure is typically an LTV of some type. The -len field is the size of the buffer in bytes, as opposed to words (like -the L-field in the LTV */ -__u16 len; -void *data; +union + { +char ifrn_name[IFNAMSIZ ]; + } ifr_ifrn; + +IFBP hcfCtx; +__u8 command; +__u8 result; + +/* The data field in this structure is typically an LTV of some type. The +len field is the size of the buffer in bytes, as opposed to words (like +the L-field in the LTV */ +__u16 len; +void *data; };struct rtsreq { -union - { -char ifrn_name[IFNAMSIZ ]; - } - ifr_ifrn; - -__u16 typ; -__u16 reg; -__u16 len; -__u16 *data; +union + { +char ifrn_name[IFNAMSIZ ]; + } + ifr_ifrn; + +__u16 typ; +__u16 reg; +__u16 len; +__u16 *data; };
Signature · 1 line
1.7.10.4
PATCH 3/8 staging: wlags49_h2: wl_if.h: fixes spaces-before-tabs issue
This commit fixes a spaces-before-tabs problem that was reported by the checkpatch.pl tool.
--- drivers/staging/wlags49_h2/wl_if.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlags49_h2/wl_if.h +1 -1
@@ -75,7 +75,7 @@#define HCF_MAX_MULTICAST 16#define HCF_MAX_NAME_LEN 32 -#define MAX_LINE_SIZE 256 +#define MAX_LINE_SIZE 256#define HCF_NUM_IO_PORTS 0x80#define TX_TIMEOUT ((800 * HZ) / 1000)
Signature · 1 line
1.7.10.4
PATCH 4/8 staging: wlags49_h2: wl_if.h: fixes 80 char line length issues
In reply to Johan MeiringThis commit sorts out 80+ char line length issues that were reported by the checkpatch.pl tool.
--- drivers/staging/wlags49_h2/wl_if.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/staging/wlags49_h2/wl_if.h +5 -4
@@ -104,7 +104,8 @@#define HCF_MAX_NOISE_LEVEL HCF_MAX_SIGNAL_LEVEL#define HCF_0DBM_OFFSET (HCF_MAX_SIGNAL_LEVEL + 1)#define HCF_MIN_COMM_QUALITY 0 -#define HCF_MAX_COMM_QUALITY (HCF_MAX_SIGNAL_LEVEL - HCF_MIN_NOISE_LEVEL + 1) +#define HCF_MAX_COMM_QUALITY (HCF_MAX_SIGNAL_LEVEL - \ + HCF_MIN_NOISE_LEVEL + 1)/* For encryption (WEP) */
@@ -207,9 +208,9 @@ struct uilreq__u8 command;__u8 result; -/* The data field in this structure is typically an LTV of some type. The -len field is the size of the buffer in bytes, as opposed to words (like -the L-field in the LTV */ +/* The data field in this structure is typically an LTV of some type. +The len field is the size of the buffer in bytes, as opposed to words +(like the L-field in the LTV */ __u16 len;void *data; };
Signature · 1 line
1.7.10.4
PATCH 5/8 staging: wlags49_h2: wl_if.h: fixes brace placement
In reply to Johan MeiringThis commit fixes incorrect brace placement, as reported by the checkpatch.pl tool.
--- drivers/staging/wlags49_h2/wl_if.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-)
drivers/staging/wlags49_h2/wl_if.h +7 -14
@@ -175,20 +175,17 @@ UIL_FUN_PUT_INFO/******************************************************************************* * STRUCTURE DEFINITIONS ******************************************************************************/ -typedef struct -{ +typedef struct {__u16 length;__u8 name[HCF_MAX_NAME_LEN ]; }wvName_t ; -typedef struct -{ +typedef struct { hcf_16 len; hcf_16 typ; - union - { + union { hcf_8 u8[MAX_LTV_BUF_SIZE / sizeof(hcf_8)]; hcf_16 u16[MAX_LTV_BUF_SIZE / sizeof(hcf_16)]; hcf_32 u32[MAX_LTV_BUF_SIZE / sizeof(hcf_32)];
@@ -197,10 +194,8 @@ typedef structltv_t ; -struct uilreq -{ -union - { +struct uilreq { +union {char ifrn_name[IFNAMSIZ ]; } ifr_ifrn;
@@ -216,10 +211,8 @@ struct uilreq }; -struct rtsreq -{ -union - { +struct rtsreq { +union {char ifrn_name[IFNAMSIZ ]; } ifr_ifrn;
Signature · 1 line
1.7.10.4
PATCH 6/8 staging: wlags49_h2: wl_if.h: gets rid of C99 // comments
In reply to Johan MeiringThis commit converts all C99 // comments to standard /* */ comments
--- drivers/staging/wlags49_h2/wl_if.h | 39 +++++++++++++++--------------------- 1 file changed, 16 insertions(+), 23 deletions(-)
drivers/staging/wlags49_h2/wl_if.h +16 -23
@@ -80,24 +80,17 @@#define TX_TIMEOUT ((800 * HZ) / 1000) -//#define HCF_MIN_COMM_QUALITY 0 -//#define HCF_MAX_COMM_QUALITY 92 -//#define HCF_MIN_SIGNAL_LEVEL 47 -//#define HCF_MAX_SIGNAL_LEVEL 138 -//#define HCF_MIN_NOISE_LEVEL 47 -//#define HCF_MAX_NOISE_LEVEL 138 -//#define HCF_0DBM_OFFSET 149 - -// PE1DNN -// Better data from the real world. Not scientific but empirical data gathered -// from a Thomson Speedtouch 110 which is identified as: -// PCMCIA Info: "Agere Systems" "Wireless PC Card Model 0110" -// Manufacture ID: 0156,0003 -// Lowest measurment for noise floor seen is value 54 -// Highest signal strength in close proximity to the AP seen is value 118 -// Very good must be around 100 (otherwise its never "full scale" -// All other constants are derrived from these. This makes the signal gauge -// work for me... +/* PE1DNN +* Better data from the real world. Not scientific but empirical data gathered +* from a Thomson Speedtouch 110 which is identified as: +* PCMCIA Info: "Agere Systems" "Wireless PC Card Model 0110" +* Manufacture ID: 0156,0003 +* Lowest measurment for noise floor seen is value 54 +* Highest signal strength in close proximity to the AP seen is value 118 +* Very good must be around 100 (otherwise its never "full scale" +* All other constants are derrived from these. This makes the signal gauge +* work for me... +*/ #define HCF_MIN_SIGNAL_LEVEL 54#define HCF_MAX_SIGNAL_LEVEL 100#define HCF_MIN_NOISE_LEVEL HCF_MIN_SIGNAL_LEVEL
@@ -109,8 +102,8 @@/* For encryption (WEP) */ -#define MIN_KEY_SIZE 5 // 40 bits RC4 - WEP -#define MAX_KEY_SIZE 13 // 104 bits +#define MIN_KEY_SIZE 5/* 40 bits RC4 - WEP */ +#define MAX_KEY_SIZE 13/* 104 bits */ #define MAX_KEYS 4#define RADIO_CHANNELS 14
@@ -126,8 +119,8 @@#define HCF_FAILURE 0xFF#define UIL_FAILURE 0xFF -#define CFG_UIL_CONNECT 0xA123 // Define differently? -#define CFG_UIL_CONNECT_ACK_CODE 0x5653435A // VSCZ +#define CFG_UIL_CONNECT 0xA123/* Define differently? */ +#define CFG_UIL_CONNECT_ACK_CODE 0x5653435A/* VSCZ */ #define WVLAN2_UIL_CONNECTED (0x01L << 0)#define WVLAN2_UIL_BUSY (0x01L << 1)
@@ -224,5 +217,5 @@ struct rtsreq { }; -#endif // __WAVELAN2_IF_H__ +#endif /* __WAVELAN2_IF_H__ */
Signature · 1 line
1.7.10.4
PATCH 7/8 staging: wlags49_h2: ap_h2.c: fixes spaces-before-tabs problems
In reply to Johan MeiringThis commit sorts out a few instances of spaces before tabs, as reported by the checkpatch.pl tool.
--- drivers/staging/wlags49_h2/ap_h2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/wlags49_h2/ap_h2.c +8 -8
@@ -25,10 +25,10 @@*/ -#include "hcfcfg.h" /* to get hcf_16 etc defined as well as */ +#include "hcfcfg.h" /* to get hcf_16 etc defined as well as */ /* possible settings which inluence mdd.h or dhf.h */ -#include "mdd.h" /* to get COMP_ID_STA etc defined */ -#include "dhf.h" /* used to be "fhfmem.h", to get memblock,plugrecord, */ +#include "mdd.h" /* to get COMP_ID_STA etc defined */ +#include "dhf.h" /* used to be "fhfmem.h", to get memblock,plugrecord, */ static const hcf_8 fw_image_1_data[] = {0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
@@ -3301,7 +3301,7 @@ static const CFG_RANGE20_STRCT fw_image_infocompat[] = {COMP_ROLE_SUPL ,COMP_ID_APF , { - { 2, 2, 4 } /* variant, bottom, top */ + { 2, 2, 4 } /* variant, bottom, top */ } }, { 3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
@@ -3309,9 +3309,9 @@ static const CFG_RANGE20_STRCT fw_image_infocompat[] = {COMP_ROLE_ACT ,COMP_ID_MFI , { - { 4, 6, 7 }, /* variant, bottom, top */ - { 5, 6, 7 }, /* variant, bottom, top */ - { 6, 6, 7 } /* variant, bottom, top */ + { 4, 6, 7 }, /* variant, bottom, top */ + { 5, 6, 7 }, /* variant, bottom, top */ + { 6, 6, 7 } /* variant, bottom, top */ } }, { 3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
@@ -3319,7 +3319,7 @@ static const CFG_RANGE20_STRCT fw_image_infocompat[] = {COMP_ROLE_ACT ,COMP_ID_CFI , { - { 2, 1, 2 } /* variant, bottom, top */ + { 2, 1, 2 } /* variant, bottom, top */ } }, { 0000, 0000, 0000, 0000, { { 0000, 0000, 0000 } } } /* endsentinel */
Signature · 1 line
1.7.10.4
PATCH 8/8 staging: wlags49_h2: ap_h2.c: fixes inconsistent spacing around *
In reply to Johan MeiringThis commit fixes an inconsistent spacing issue around *
--- drivers/staging/wlags49_h2/ap_h2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wlags49_h2/ap_h2.c +4 -4
@@ -3256,7 +3256,7 @@ static const CFG_PROG_STRCT fw_image_code[] = {0x0146 ,/* sizeof(fw_image_1_data), */ 0x00000060 ,/* Target address in NIC Memory */ 0x0000 ,/* CRC: yes/no TYPE: primary/station/tertiary */ - (hcf_8 FAR *) fw_image_1_data + (hcf_8 FAR*) fw_image_1_data }, { 8,
@@ -3265,7 +3265,7 @@ static const CFG_PROG_STRCT fw_image_code[] = {0x1918 ,/* sizeof(fw_image_2_data), */ 0x00000C16 ,/* Target address in NIC Memory */ 0x0000 ,/* CRC: yes/no TYPE: primary/station/tertiary */ - (hcf_8 FAR *) fw_image_2_data + (hcf_8 FAR*) fw_image_2_data }, { 8,
@@ -3274,7 +3274,7 @@ static const CFG_PROG_STRCT fw_image_code[] = {0x01bc ,/* sizeof(fw_image_3_data), */ 0x001E252E ,/* Target address in NIC Memory */ 0x0000 ,/* CRC: yes/no TYPE: primary/station/tertiary */ - (hcf_8 FAR *) fw_image_3_data + (hcf_8 FAR*) fw_image_3_data }, { 8,
@@ -3283,7 +3283,7 @@ static const CFG_PROG_STRCT fw_image_code[] = {0xab28 ,/* sizeof(fw_image_4_data), */ 0x001F4000 ,/* Target address in NIC Memory */ 0x0000 ,/* CRC: yes/no TYPE: primary/station/tertiary */ - (hcf_8 FAR *) fw_image_4_data + (hcf_8 FAR*) fw_image_4_data }, { 5,
Signature · 1 line
1.7.10.4
Re: [PATCH 8/8] staging: wlags49_h2: ap_h2.c: fixes inconsistent spacing around *
Quoted 2 lines · Johan Meiring
This commit fixes an inconsistent spacing issue around *
The others are good, but this one is not right.
Quoted 10 lines
Signed-off-by Johan Meiring <[email protected]>--- drivers/staging/wlags49_h2/ap_h2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/staging/wlags49_h2/ap_h2.c +0
-0
drivers/staging/wlags49_h2/ap_h2.c static const CFG_PROG_STRCT fw_image_code[] = { · line 3259
Quoted 5 lines
drivers/staging/wlags49_h2/ap_h2.c +1
-1@@ -3256,7 +3256,7 @@ static const CFG_PROG_STRCT fw_image_code[] = {0x0146 ,/* sizeof(fw_image_1_data), */ 0x00000060 ,/* Target address in NIC Memory */ 0x0000 ,/* CRC: yes/no TYPE: primary/station/tertiary */ - (hcf_8 FAR *) fw_image_1_data + (hcf_8 FAR*) fw_image_1_data
We don't use far pointers in linux. When you're casting something there is no space between the cat operation and the variable. The reason is that casting is a high precedence operation.
More readable: (char *)p + 1; Less readable: (char *) p + 1;
In the first line it's obvious that we cast first and then add 1.
So this should be:
(hcf_8 *)fw_image_1_data,
regards,
dan carpenter