Skip to contentSkip to conversation

Staging : rtl8712 : Fixed a coding sytle issue

PATCH Superseded Ankit Baluni 1 participant 2 messages Jul 28, 2020 – Jul 29, 2020 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging : rtl8712 : Fixed a coding sytle issue

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -2
index c6f6ccd060bb..df6ae855f3c1 100644
@@ -238,9 +238,8 @@ static char *translate_scan(struct _adapter *padapter,
 	/* parsing HT_CAP_IE */
 	p = r8712_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_,
 			 &ht_ielen, pnetwork->network.IELength - 12);
-	if (p && ht_ielen > 0) {
+	if (p && ht_ielen > 0)
 		ht_cap = true;
-	}
 	/* Add the protocol name */
 	iwe.cmd = SIOCGIWNAME;
 	if (r8712_is_cckratesonly_included(pnetwork->network.rates)) {
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 Staging: rtl8712: Fixed a coding sytle issue

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

---
Change in -v2:
-Remove space before ':' in subject .

 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -2
index c6f6ccd060bb..df6ae855f3c1 100644
@@ -238,9 +238,8 @@ static char *translate_scan(struct _adapter *padapter,
 	/* parsing HT_CAP_IE */
 	p = r8712_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_,
 			 &ht_ielen, pnetwork->network.IELength - 12);
-	if (p && ht_ielen > 0) {
+	if (p && ht_ielen > 0)
 		ht_cap = true;
-	}
 	/* Add the protocol name */
 	iwe.cmd = SIOCGIWNAME;
 	if (r8712_is_cckratesonly_included(pnetwork->network.rates)) {
Signature · 1 line
2.25.1