[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1423562655-29971-6-git-send-email-pushpendra.singh@smartplayin.com>
Date: Tue, 10 Feb 2015 15:34:14 +0530
From: Pushpendra Singh <pushpendra.singh@...rtplayin.com>
To: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org
Cc: navin.patidar@...il.com, gmate.amit@...il.com,
manuel.schoelling@....de,
Pushpendra Singh <pushpendra.singh@...rtplayin.com>
Subject: [PATCH 6/7] staging: rtl8188eu: core: removed unnecessary braces
remove checkpatch.pl warning
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Pushpendra Singh <pushpendra.singh@...rtplayin.com>
---
drivers/staging/rtl8188eu/core/rtw_efuse.c | 3 +--
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 14 +++++---------
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 4 ++--
drivers/staging/rtl8188eu/core/rtw_recv.c | 17 ++++++-----------
drivers/staging/rtl8188eu/core/rtw_xmit.c | 19 +++++++------------
5 files changed, 21 insertions(+), 36 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index e15112b..e77fd99 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
@@ -644,9 +644,8 @@ static bool hal_EfusePgPacketWrite2ByteHeader(struct adapter *pAdapter, u8 efuse
}
if ((tmp_header & 0x0F) == 0x0F) { /* word_en PG fail */
- if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
+ if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
return false;
- }
efuse_addr++;
continue;
} else if (pg_header != tmp_header) { /* offset PG fail */
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 868f5ec..f9ac1e7 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -299,9 +299,8 @@ static void init_channel_list(struct adapter *padapter, struct rt_channel_info *
struct p2p_reg_class *reg = NULL;
for (ch = o->min_chan; ch <= o->max_chan; ch += o->inc) {
- if (!has_channel(channel_set, chanset_size, ch)) {
+ if (!has_channel(channel_set, chanset_size, ch))
continue;
- }
if ((0 == padapter->registrypriv.ht_enable) && (8 == o->inc))
continue;
@@ -1420,11 +1419,10 @@ unsigned int OnAssocRsp(struct adapter *padapter, struct recv_frame *precv_frame
UpdateBrateTbl(padapter, pmlmeinfo->network.SupportedRates);
report_assoc_result:
- if (res > 0) {
+ if (res > 0)
rtw_buf_update(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len, pframe, pkt_len);
- } else {
+ else
rtw_buf_free(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len);
- }
report_join_res(padapter, res);
@@ -1929,9 +1927,8 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmg
pxmitpriv->ack_tx = true;
pmgntframe->ack_report = 1;
- if (rtw_hal_mgnt_xmit(padapter, pmgntframe) == _SUCCESS) {
+ if (rtw_hal_mgnt_xmit(padapter, pmgntframe) == _SUCCESS)
ret = rtw_ack_tx_wait(pxmitpriv, timeout_ms);
- }
pxmitpriv->ack_tx = false;
mutex_unlock(&pxmitpriv->ack_tx_mutex);
@@ -4793,9 +4790,8 @@ void linked_status_chk(struct adapter *padapter)
}
}
- if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf) {
+ if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf)
tx_chk = issue_nulldata(padapter, NULL, 0, 1, 0);
- }
}
if (rx_chk == _FAIL) {
diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
index 1fe25ac..994460b 100644
--- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
@@ -185,9 +185,9 @@ int ips_leave(struct adapter *padapter)
DBG_88E("==>ips_leave cnts:%d\n", pwrpriv->ips_leave_cnts);
result = rtw_ips_pwr_up(padapter);
- if (result == _SUCCESS) {
+ if (result == _SUCCESS)
pwrpriv->rf_pwrstate = rf_on;
- }
+
DBG_88E_LEVEL(_drv_info_, "nolinked power save leave\n");
if ((_WEP40_ == psecuritypriv->dot11PrivacyAlgrthm) || (_WEP104_ == psecuritypriv->dot11PrivacyAlgrthm)) {
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 565feff..a36d27a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -116,9 +116,8 @@ void _rtw_free_recv_priv(struct recv_priv *precvpriv)
rtw_free_uc_swdec_pending_queue(padapter);
- if (precvpriv->pallocated_frame_buf) {
+ if (precvpriv->pallocated_frame_buf)
vfree(precvpriv->pallocated_frame_buf);
- }
rtw_hal_free_recv_priv(padapter);
@@ -942,9 +941,8 @@ static int sta2ap_data_frame(struct adapter *adapter,
process_pwrbit_data(adapter, precv_frame);
- if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
+ if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
process_wmmps_data(adapter, precv_frame);
- }
if (GetFrameSubType(ptr) & BIT(6)) {
/* No data, will not indicate to upper layer, temporily count it here */
@@ -1192,11 +1190,10 @@ static int validate_recv_data_frame(struct adapter *adapter,
break;
}
- if (ret == _FAIL) {
+ if (ret == _FAIL)
goto exit;
- } else if (ret == RTW_RX_HANDLED) {
+ else if (ret == RTW_RX_HANDLED)
goto exit;
- }
if (psta == NULL) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" after to_fr_ds_chk; psta==NULL\n"));
@@ -1686,13 +1683,11 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
a_len -= nSubframe_Length;
if (a_len != 0) {
padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4-1));
- if (padding_len == 4) {
+ if (padding_len == 4)
padding_len = 0;
- }
- if (a_len < padding_len) {
+ if (a_len < padding_len)
goto exit;
- }
pdata += padding_len;
a_len -= padding_len;
}
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index 92794f0..227498c 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -148,9 +148,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
if (res == _FAIL) {
msleep(10);
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ));
- if (res == _FAIL) {
+ if (res == _FAIL)
goto exit;
- }
}
pxmitbuf->flags = XMIT_VO_QUEUE;
@@ -259,9 +258,8 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
pxmitbuf++;
}
- if (pxmitpriv->pallocated_xmit_extbuf) {
+ if (pxmitpriv->pallocated_xmit_extbuf)
vfree(pxmitpriv->pallocated_xmit_extbuf);
- }
rtw_free_hwxmits(padapter);
@@ -793,11 +791,10 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
if (pattrib->psta) {
psta = pattrib->psta;
} else {
- if (bmcst) {
+ if (bmcst)
psta = rtw_get_bcmc_stainfo(padapter);
- } else {
+ else
psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
- }
}
memset(hdr, 0, WLANHDR_OFFSET);
@@ -1062,9 +1059,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
mpdu_len -= llc_sz;
}
- if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
+ if ((pattrib->icv_len > 0) && (pattrib->bswenc))
mpdu_len -= pattrib->icv_len;
- }
if (bmcst) {
/* don't do fragment to broadcat/multicast packets */
@@ -1601,11 +1597,10 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
int res = _SUCCESS;
- if (pattrib->psta) {
+ if (pattrib->psta)
psta = pattrib->psta;
- } else {
+ else
psta = rtw_get_stainfo(pstapriv, pattrib->ra);
- }
if (psta == NULL) {
res = _FAIL;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists