Skip to contentSkip to conversation

Staging: rtl8192e: Fix some code style issues

PATCH In review Gabriel Maciel Raad 2 participants 4 messages Aug 23, 2024 Staging

lore
Share & tools
lore
#0 lore raw

v2 cover Staging: rtl8192e: Fix some code style issues

Fix some code style issues in rtl_ps.c

Gabriel Maciel Raad (2):
Staging: rtl8192e: Fix parenthesis alignment
Staging: rtl8192e: Remove unnecessary blank line

 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.46.0
#1 lore raw

PATCH v2 1/2 Staging: rtl8192e: Fix parenthesis alignment

Fix parenthesis alingment in rtl92e_leisure_ps_enter to silence the following checkpatch.pl warning:

CHECK: Alignment should match open parenthesis

---
Changes in v2:
- Split the changes in two patches

---
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +1 -1
index 5aac9110bff6..1f881c27d4b4 100644
@@ -204,7 +204,7 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
 					&priv->rtllib->pwr_save_ctrl;
 
 	if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
-	    (priv->rtllib->link_state == MAC80211_LINKED)))
+	      (priv->rtllib->link_state == MAC80211_LINKED)))
 		return;
 
 	if (psc->bLeisurePs) {
Signature · 1 line
2.46.0
#2 lore raw

Re: [PATCH v2 1/2] Staging: rtl8192e: Fix parenthesis alignment

Quoted 18 lines · Gabriel Maciel Raad

Fix parenthesis alingment in rtl92e_leisure_ps_enter to silence the following checkpatch.pl warning:

CHECK: Alignment should match open parenthesis

---
Changes in v2:
- Split the changes in two patches

---
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +0 -0
index 5aac9110bff6..1f881c27d4b4 100644

drivers/staging/rtl8192e/rtl8192e/rtl_ps.c void rtl92e_leisure_ps_enter(struct net_device *dev) · line 208

Quoted 6 lines
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +1 -1
@@ -204,7 +204,7 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
 					&priv->rtllib->pwr_save_ctrl;
 
 	if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
-	    (priv->rtllib->link_state == MAC80211_LINKED)))
+	      (priv->rtllib->link_state == MAC80211_LINKED)))
 		return;

It would be nicer to write this as:

        if (priv->rtllib->iw_mode != IW_MODE_INFRA ||
            priv->rtllib->link_state != MAC80211_LINKED)
                return;

regards,
dan carpenter

#3 lore raw

PATCH v2 2/2 Staging: rtl8192e: Remove unnecessary blank line

In reply to Gabriel Maciel Raad

Remove unneeded blank line in rtl92e_leisure_ps_enter to silence the folowing checkpatch.pl warning:

CHECK: Blank lines aren't necessary after an open brace '{'

---
Changes in v2:
- Split the changes in two patches

---
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +0 -1
index 1f881c27d4b4..7b6247acf6f4 100644
@@ -209,7 +209,6 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
 
 	if (psc->bLeisurePs) {
 		if (psc->lps_idle_count >= RT_CHECK_FOR_HANG_PERIOD) {
-
 			if (priv->rtllib->ps == RTLLIB_PS_DISABLED)
 				_rtl92e_ps_set_mode(dev, RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST);
 		} else {
Signature · 1 line
2.46.0