* [patch net-next 1/5] mac80211: fix checkpatch error
2013-12-18 7:44 [patch net-next 0/5] mac80211: clean up some chekpatch errors Chen Weilong
@ 2013-12-18 7:44 ` Chen Weilong
2013-12-18 7:44 ` [patch net-next 2/5] " Chen Weilong
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Chen Weilong @ 2013-12-18 7:44 UTC (permalink / raw)
To: davem, linville, johannes; +Cc: netdev
From: Weilong Chen <chenweilong@huawei.com>
"foo * bar" should be "foo *bar".
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
---
net/mac80211/aes_cmac.c | 2 +-
net/mac80211/aes_cmac.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/aes_cmac.c b/net/mac80211/aes_cmac.c
index 537488c..9b9009f 100644
--- a/net/mac80211/aes_cmac.c
+++ b/net/mac80211/aes_cmac.c
@@ -111,7 +111,7 @@ void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad,
}
-struct crypto_cipher * ieee80211_aes_cmac_key_setup(const u8 key[])
+struct crypto_cipher *ieee80211_aes_cmac_key_setup(const u8 key[])
{
struct crypto_cipher *tfm;
diff --git a/net/mac80211/aes_cmac.h b/net/mac80211/aes_cmac.h
index 20785a6..0ce6487 100644
--- a/net/mac80211/aes_cmac.h
+++ b/net/mac80211/aes_cmac.h
@@ -11,7 +11,7 @@
#include <linux/crypto.h>
-struct crypto_cipher * ieee80211_aes_cmac_key_setup(const u8 key[]);
+struct crypto_cipher *ieee80211_aes_cmac_key_setup(const u8 key[]);
void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad,
const u8 *data, size_t data_len, u8 *mic);
void ieee80211_aes_cmac_key_free(struct crypto_cipher *tfm);
--
1.7.12
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [patch net-next 2/5] mac80211: fix checkpatch error
2013-12-18 7:44 [patch net-next 0/5] mac80211: clean up some chekpatch errors Chen Weilong
2013-12-18 7:44 ` [patch net-next 1/5] mac80211: fix checkpatch error Chen Weilong
@ 2013-12-18 7:44 ` Chen Weilong
2013-12-18 7:44 ` [patch net-next 3/5] " Chen Weilong
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Chen Weilong @ 2013-12-18 7:44 UTC (permalink / raw)
To: davem, linville, johannes; +Cc: netdev
From: Weilong Chen <chenweilong@huawei.com>
"(foo*)" should be "(foo *)"
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
---
net/mac80211/tx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c558b24..c616830 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2136,7 +2136,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
if (ieee80211_is_data_qos(fc)) {
__le16 *qos_control;
- qos_control = (__le16*) skb_push(skb, 2);
+ qos_control = (__le16 *) skb_push(skb, 2);
memcpy(skb_push(skb, hdrlen - 2), &hdr, hdrlen - 2);
/*
* Maybe we could actually set some fields here, for now just
@@ -2298,7 +2298,7 @@ static void __ieee80211_beacon_add_tim(struct ieee80211_sub_if_data *sdata,
if (atomic_read(&ps->num_sta_ps) > 0)
/* in the hope that this is faster than
* checking byte-for-byte */
- have_bits = !bitmap_empty((unsigned long*)ps->tim,
+ have_bits = !bitmap_empty((unsigned long *)ps->tim,
IEEE80211_MAX_AID+1);
if (ps->dtim_count == 0)
--
1.7.12
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [patch net-next 3/5] mac80211: fix checkpatch error
2013-12-18 7:44 [patch net-next 0/5] mac80211: clean up some chekpatch errors Chen Weilong
2013-12-18 7:44 ` [patch net-next 1/5] mac80211: fix checkpatch error Chen Weilong
2013-12-18 7:44 ` [patch net-next 2/5] " Chen Weilong
@ 2013-12-18 7:44 ` Chen Weilong
2013-12-18 7:44 ` [patch net-next 4/5] " Chen Weilong
2013-12-18 7:44 ` [patch net-next 5/5] " Chen Weilong
4 siblings, 0 replies; 7+ messages in thread
From: Chen Weilong @ 2013-12-18 7:44 UTC (permalink / raw)
To: davem, linville, johannes; +Cc: netdev
From: Weilong Chen <chenweilong@huawei.com>
Space required.
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
---
net/mac80211/rc80211_minstrel.c | 4 ++--
net/mac80211/trace.h | 2 +-
net/mac80211/util.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 7fa1b36..781a1e2 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -135,7 +135,7 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
u32 usecs;
int i;
- for (i=0; i < MAX_THR_RATES; i++)
+ for (i = 0; i < MAX_THR_RATES; i++)
tmp_tp_rate[i] = 0;
for (i = 0; i < mi->n_rates; i++) {
@@ -190,7 +190,7 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
* choose the maximum throughput rate as max_prob_rate
* (2) if all success probabilities < 95%, the rate with
* highest success probability is choosen as max_prob_rate */
- if (mr->probability >= MINSTREL_FRAC(95,100)) {
+ if (mr->probability >= MINSTREL_FRAC(95, 100)) {
if (mr->cur_tp >= mi->r[tmp_prob_rate].cur_tp)
tmp_prob_rate = i;
} else {
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index d4cee98..bec7371 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -560,7 +560,7 @@ TRACE_EVENT(drv_update_tkip_key,
TP_printk(
LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
- LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
+ LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
)
);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 9f9b9bd..0ec4d51 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -76,7 +76,7 @@ u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
}
if (ieee80211_is_ctl(fc)) {
- if(ieee80211_is_pspoll(fc))
+ if (ieee80211_is_pspoll(fc))
return hdr->addr1;
if (ieee80211_is_back_req(fc)) {
--
1.7.12
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [patch net-next 4/5] mac80211: fix checkpatch error
2013-12-18 7:44 [patch net-next 0/5] mac80211: clean up some chekpatch errors Chen Weilong
` (2 preceding siblings ...)
2013-12-18 7:44 ` [patch net-next 3/5] " Chen Weilong
@ 2013-12-18 7:44 ` Chen Weilong
2013-12-18 7:44 ` [patch net-next 5/5] " Chen Weilong
4 siblings, 0 replies; 7+ messages in thread
From: Chen Weilong @ 2013-12-18 7:44 UTC (permalink / raw)
To: davem, linville, johannes; +Cc: netdev
From: Weilong Chen <chenweilong@huawei.com>
Code indent should use tabs where possible
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
---
net/mac80211/rc80211_minstrel.c | 4 ++--
net/mac80211/tkip.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 781a1e2..5fa66be 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -220,7 +220,7 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
static void
minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta, void *priv_sta,
+ struct ieee80211_sta *sta, void *priv_sta,
struct sk_buff *skb)
{
struct minstrel_priv *mp = priv;
@@ -260,7 +260,7 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband,
static inline unsigned int
minstrel_get_retry_count(struct minstrel_rate *mr,
- struct ieee80211_tx_info *info)
+ struct ieee80211_tx_info *info)
{
unsigned int retry = mr->adjusted_retry_count;
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index 124b1fd..0ae2077 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -186,7 +186,7 @@ void ieee80211_get_tkip_p1k_iv(struct ieee80211_key_conf *keyconf,
EXPORT_SYMBOL(ieee80211_get_tkip_p1k_iv);
void ieee80211_get_tkip_rx_p1k(struct ieee80211_key_conf *keyconf,
- const u8 *ta, u32 iv32, u16 *p1k)
+ const u8 *ta, u32 iv32, u16 *p1k)
{
const u8 *tk = &keyconf->key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY];
struct tkip_ctx ctx;
--
1.7.12
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [patch net-next 5/5] mac80211: fix checkpatch error
2013-12-18 7:44 [patch net-next 0/5] mac80211: clean up some chekpatch errors Chen Weilong
` (3 preceding siblings ...)
2013-12-18 7:44 ` [patch net-next 4/5] " Chen Weilong
@ 2013-12-18 7:44 ` Chen Weilong
2013-12-18 9:05 ` Johannes Berg
4 siblings, 1 reply; 7+ messages in thread
From: Chen Weilong @ 2013-12-18 7:44 UTC (permalink / raw)
To: davem, linville, johannes; +Cc: netdev
From: Weilong Chen <chenweilong@huawei.com>
Space prohibited next to the parenthesis
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
---
net/mac80211/rc80211_minstrel_ht.c | 2 +-
net/mac80211/sta_info.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 4096ff6..1c47bf4 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -63,7 +63,7 @@
#define CCK_DURATION(_bitrate, _short, _len) \
(1000 * (10 /* SIFS */ + \
- (_short ? 72 + 24 : 144 + 48 ) + \
+ (_short ? 72 + 24 : 144 + 48) + \
(8 * (_len + 4) * 10) / (_bitrate)))
#define CCK_ACK_DURATION(_bitrate, _short) \
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 3ef06a2..698eca7 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -528,7 +528,7 @@ void for_each_sta_info_type_check(struct ieee80211_local *local,
}
#define for_each_sta_info(local, _addr, _sta, nxt) \
- for ( /* initialise loop */ \
+ for (/* initialise loop */ \
_sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\
nxt = _sta ? rcu_dereference(_sta->hnext) : NULL; \
/* typecheck */ \
--
1.7.12
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [patch net-next 5/5] mac80211: fix checkpatch error
2013-12-18 7:44 ` [patch net-next 5/5] " Chen Weilong
@ 2013-12-18 9:05 ` Johannes Berg
0 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2013-12-18 9:05 UTC (permalink / raw)
To: Chen Weilong; +Cc: davem, linville, netdev
On Wed, 2013-12-18 at 15:44 +0800, Chen Weilong wrote:
> #define for_each_sta_info(local, _addr, _sta, nxt) \
> - for ( /* initialise loop */ \
> + for (/* initialise loop */ \
> _sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\
> nxt = _sta ? rcu_dereference(_sta->hnext) : NULL; \
> /* typecheck */ \
I've applied it all (I squashed it though, no sense in having 5 small
commits that look identical on first glance), except for this bit - the
code here is aligned that way on purpose.
johannes
^ permalink raw reply [flat|nested] 7+ messages in thread