* [PATCH 3/8] staging: wlags49_h2: wl_if.h: fixes spaces-before-tabs issue
2012-11-20 14:44 [PATCH 2/8] staging: wlags49_h2: wl_if.h: fixes tab indentation Johan Meiring
@ 2012-11-20 14:44 ` Johan Meiring
2012-11-20 14:44 ` [PATCH 4/8] staging: wlags49_h2: wl_if.h: fixes 80 char line length issues Johan Meiring
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Johan Meiring @ 2012-11-20 14:44 UTC (permalink / raw)
To: pe1dnn, jkosina, standby24x7, viro, gregkh
Cc: devel, linux-kernel, Johan Meiring
This commit fixes a spaces-before-tabs problem that was reported by
the checkpatch.pl tool.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
---
drivers/staging/wlags49_h2/wl_if.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wlags49_h2/wl_if.h b/drivers/staging/wlags49_h2/wl_if.h
index 5c6b2b5..d1fdf82 100644
--- a/drivers/staging/wlags49_h2/wl_if.h
+++ b/drivers/staging/wlags49_h2/wl_if.h
@@ -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)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 4/8] staging: wlags49_h2: wl_if.h: fixes 80 char line length issues
2012-11-20 14:44 [PATCH 2/8] staging: wlags49_h2: wl_if.h: fixes tab indentation Johan Meiring
2012-11-20 14:44 ` [PATCH 3/8] staging: wlags49_h2: wl_if.h: fixes spaces-before-tabs issue Johan Meiring
@ 2012-11-20 14:44 ` Johan Meiring
2012-11-20 14:44 ` [PATCH 5/8] staging: wlags49_h2: wl_if.h: fixes brace placement Johan Meiring
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Johan Meiring @ 2012-11-20 14:44 UTC (permalink / raw)
To: pe1dnn, jkosina, standby24x7, viro, gregkh
Cc: devel, linux-kernel, Johan Meiring
This commit sorts out 80+ char line length issues that were reported
by the checkpatch.pl tool.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
---
drivers/staging/wlags49_h2/wl_if.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_if.h b/drivers/staging/wlags49_h2/wl_if.h
index d1fdf82..61193b3 100644
--- a/drivers/staging/wlags49_h2/wl_if.h
+++ b/drivers/staging/wlags49_h2/wl_if.h
@@ -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;
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 5/8] staging: wlags49_h2: wl_if.h: fixes brace placement
2012-11-20 14:44 [PATCH 2/8] staging: wlags49_h2: wl_if.h: fixes tab indentation Johan Meiring
2012-11-20 14:44 ` [PATCH 3/8] staging: wlags49_h2: wl_if.h: fixes spaces-before-tabs issue Johan Meiring
2012-11-20 14:44 ` [PATCH 4/8] staging: wlags49_h2: wl_if.h: fixes 80 char line length issues Johan Meiring
@ 2012-11-20 14:44 ` Johan Meiring
2012-11-20 14:44 ` [PATCH 6/8] staging: wlags49_h2: wl_if.h: gets rid of C99 // comments Johan Meiring
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Johan Meiring @ 2012-11-20 14:44 UTC (permalink / raw)
To: pe1dnn, jkosina, standby24x7, viro, gregkh
Cc: devel, linux-kernel, Johan Meiring
This commit fixes incorrect brace placement, as reported by the
checkpatch.pl tool.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
---
drivers/staging/wlags49_h2/wl_if.h | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_if.h b/drivers/staging/wlags49_h2/wl_if.h
index 61193b3..351d29b 100644
--- a/drivers/staging/wlags49_h2/wl_if.h
+++ b/drivers/staging/wlags49_h2/wl_if.h
@@ -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 struct
ltv_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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 6/8] staging: wlags49_h2: wl_if.h: gets rid of C99 // comments
2012-11-20 14:44 [PATCH 2/8] staging: wlags49_h2: wl_if.h: fixes tab indentation Johan Meiring
` (2 preceding siblings ...)
2012-11-20 14:44 ` [PATCH 5/8] staging: wlags49_h2: wl_if.h: fixes brace placement Johan Meiring
@ 2012-11-20 14:44 ` Johan Meiring
2012-11-20 14:44 ` [PATCH 7/8] staging: wlags49_h2: ap_h2.c: fixes spaces-before-tabs problems Johan Meiring
2012-11-20 14:45 ` [PATCH 8/8] staging: wlags49_h2: ap_h2.c: fixes inconsistent spacing around * Johan Meiring
5 siblings, 0 replies; 8+ messages in thread
From: Johan Meiring @ 2012-11-20 14:44 UTC (permalink / raw)
To: pe1dnn, jkosina, standby24x7, viro, gregkh
Cc: devel, linux-kernel, Johan Meiring
This commit converts all C99 // comments to standard /* */ comments
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
---
drivers/staging/wlags49_h2/wl_if.h | 39 +++++++++++++++---------------------
1 file changed, 16 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_if.h b/drivers/staging/wlags49_h2/wl_if.h
index 351d29b..425d373 100644
--- a/drivers/staging/wlags49_h2/wl_if.h
+++ b/drivers/staging/wlags49_h2/wl_if.h
@@ -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__ */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 7/8] staging: wlags49_h2: ap_h2.c: fixes spaces-before-tabs problems
2012-11-20 14:44 [PATCH 2/8] staging: wlags49_h2: wl_if.h: fixes tab indentation Johan Meiring
` (3 preceding siblings ...)
2012-11-20 14:44 ` [PATCH 6/8] staging: wlags49_h2: wl_if.h: gets rid of C99 // comments Johan Meiring
@ 2012-11-20 14:44 ` Johan Meiring
2012-11-20 14:45 ` [PATCH 8/8] staging: wlags49_h2: ap_h2.c: fixes inconsistent spacing around * Johan Meiring
5 siblings, 0 replies; 8+ messages in thread
From: Johan Meiring @ 2012-11-20 14:44 UTC (permalink / raw)
To: pe1dnn, jkosina, standby24x7, viro, gregkh
Cc: devel, linux-kernel, Johan Meiring
This commit sorts out a few instances of spaces before tabs, as
reported by the checkpatch.pl tool.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
---
drivers/staging/wlags49_h2/ap_h2.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/wlags49_h2/ap_h2.c b/drivers/staging/wlags49_h2/ap_h2.c
index eb8244c..e524153 100644
--- a/drivers/staging/wlags49_h2/ap_h2.c
+++ b/drivers/staging/wlags49_h2/ap_h2.c
@@ -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 */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 8/8] staging: wlags49_h2: ap_h2.c: fixes inconsistent spacing around *
2012-11-20 14:44 [PATCH 2/8] staging: wlags49_h2: wl_if.h: fixes tab indentation Johan Meiring
` (4 preceding siblings ...)
2012-11-20 14:44 ` [PATCH 7/8] staging: wlags49_h2: ap_h2.c: fixes spaces-before-tabs problems Johan Meiring
@ 2012-11-20 14:45 ` Johan Meiring
2012-11-21 8:34 ` Dan Carpenter
5 siblings, 1 reply; 8+ messages in thread
From: Johan Meiring @ 2012-11-20 14:45 UTC (permalink / raw)
To: pe1dnn, jkosina, standby24x7, viro, gregkh
Cc: devel, linux-kernel, Johan Meiring
This commit fixes an inconsistent spacing issue around *
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
---
drivers/staging/wlags49_h2/ap_h2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wlags49_h2/ap_h2.c b/drivers/staging/wlags49_h2/ap_h2.c
index e524153..c2d43ec 100644
--- a/drivers/staging/wlags49_h2/ap_h2.c
+++ b/drivers/staging/wlags49_h2/ap_h2.c
@@ -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,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 8/8] staging: wlags49_h2: ap_h2.c: fixes inconsistent spacing around *
2012-11-20 14:45 ` [PATCH 8/8] staging: wlags49_h2: ap_h2.c: fixes inconsistent spacing around * Johan Meiring
@ 2012-11-21 8:34 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2012-11-21 8:34 UTC (permalink / raw)
To: Johan Meiring
Cc: pe1dnn, jkosina, standby24x7, viro, gregkh, devel, linux-kernel
On Tue, Nov 20, 2012 at 04:45:00PM +0200, Johan Meiring wrote:
> This commit fixes an inconsistent spacing issue around *
>
The others are good, but this one is not right.
> Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
> ---
> drivers/staging/wlags49_h2/ap_h2.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/wlags49_h2/ap_h2.c b/drivers/staging/wlags49_h2/ap_h2.c
> index e524153..c2d43ec 100644
> --- a/drivers/staging/wlags49_h2/ap_h2.c
> +++ b/drivers/staging/wlags49_h2/ap_h2.c
> @@ -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
^ permalink raw reply [flat|nested] 8+ messages in thread