Fixes the following checkpatch.pl errors/warnings:
WARNING: please, no spaces at the start of a line
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
ERROR: space required before the open brace '{'
ERROR: exactly one space required after that #ifdef
WARNING: Missing a blank line after declarations
ERROR: space prohibited after that '&' (ctx:WxW)
WARNING: braces {} are not necessary for single statement blocks
CHECK: No space is necessary after a cast
Signed-off-by: Carlos Maiolino
---
drivers/staging/ks7010/ks_hostif.c | 32 +---
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c
b/drivers/staging/ks7010/ks_hostif.c
index c57ca58..e2277c5 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -23,11 +23,11 @@
/* macro */
#define inc_smeqhead(priv) \
-( priv->sme_i.qhead = (priv->sme_i.qhead + 1) % SME_EVENT_BUFF_SIZE )
+ (priv->sme_i.qhead = (priv->sme_i.qhead + 1) % SME_EVENT_BUFF_SIZE)
#define inc_smeqtail(priv) \
-( priv->sme_i.qtail = (priv->sme_i.qtail + 1) % SME_EVENT_BUFF_SIZE )
+ (priv->sme_i.qtail = (priv->sme_i.qtail + 1) % SME_EVENT_BUFF_SIZE)
#define cnt_smeqbody(priv) \
-(((priv->sme_i.qtail + SME_EVENT_BUFF_SIZE) - (priv->sme_i.qhead)) %
SME_EVENT_BUFF_SIZE )
+ (((priv->sme_i.qtail + SME_EVENT_BUFF_SIZE) - (priv->sme_i.qhead)) %
SME_EVENT_BUFF_SIZE)
#define KS_WLAN_MEM_FLAG (GFP_ATOMIC)
@@ -97,11 +97,10 @@ int ks_wlan_do_power_save(struct ks_wlan_private *priv)
{
DPRINTK(4, "psstatus.status=%d\n", atomic_read(>psstatus.status));
- if ((priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS) {
+ if ((priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS)
hostif_sme_enqueue(priv, SME_POW_MNGMT_REQUEST);
- } else {
+ else
priv->dev_state = DEVICE_STATE_READY;
- }
return 0;
}
@@ -386,7 +385,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
(priv->rxp) + ((priv->rx_size) - 8), 8);
priv->rx_size = priv->rx_size - 8;
if (auth_type > 0 && auth_type < 4) { /*
auth_type check */
- MichaelMICFunction(_mic,
(uint8_t *) priv->wpa.key[auth_type - 1].rx_mic_key, (uint8_t *) priv->rxp,
(int)priv->rx_size, (uint8_t) 0,/* priority */
+ MichaelMICFunction(_mic,
(uint8_t *)priv->wpa.key[auth_type - 1].rx_mic_key, (uint8_t *)priv->rxp,
(int)priv->rx_size, (uint8_t)0, /* priority */
(uint8_t *)
michel_mic.Result);
}
@@ -766,8 +765,9 @@ void hostif_sleep_confirm(struct ks_wlan_private *priv)
static
void hostif_start_confirm(struct ks_wlan_private *priv)
{
-#ifdef WPS
+#ifdef WPS
union iwreq_data wrqu;
+
wrqu.data.length = 0;
wrqu.data.flags = 0;
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
@@ -789,6 +789,7 @@ void hostif_connect_indication(struct ks_wlan_private *priv)
unsigned int old_status = priv->connect_status;
struct net_device *netdev = priv->net_dev;
union iwreq_data wrqu0;
+
connect_code = get_WORD(priv);
switch (connect_code) {
@@ -928,6 +929,7 @@ static
void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv)
{
uint16_t result_code;
+
DPRINTK(3, "\n");
result_code = get_WORD(priv);
DPRINTK(3, "result code = %d\n", result_code);
@@ -993,6 +995,7 @@ void hostif_bss_scan_confirm(struct ks_wlan_private *priv)
unsigned int result_code;
struct net_device *dev = priv->net_dev;
union iwreq_data wrqu;
+
result_code = get_DWORD(priv);
DPRINTK(2, "result=%d :: scan_ind_count=%d\n", result_code,
priv->scan_ind_count);
@@ -1244,7 +1247,7 @@ int hostif_data_request(struct ks_wlan_private *priv,
struct sk_buff *packet)
pp->auth_type = cpu_to_le16((uint16_t) TYPE_AUTH);
/* no encryption */
} else {
if (priv->wpa.pairwise_suite == IW_AUTH_CIPHER_TKIP) {
- MichaelMICFunction(_mic, (uint8_t *)
priv->wpa.key[0].tx_mic_key, (uint8_t *) & pp->data[0], (int)packet_len,
(uint8_t) 0, /* priority */
+ MichaelMICFunction(_mic, (uint8_t
*)priv->wpa.key[0].tx_mic_key, (uint8_t *)>data[0], (int)packet_len,
(uint8_t)0, /* priority */
(uint8_t *) michel_mic.
Result);
memcpy(p,