[PATCH v3] Staging: rtl8723bs: Remove spaces before tabs in rtw_set_auth

Meir Elisha posted 1 patch 1 year, 11 months ago
drivers/staging/rtl8723bs/core/rtw_mlme.c | 48 +++++++++++------------
1 file changed, 24 insertions(+), 24 deletions(-)
[PATCH v3] Staging: rtl8723bs: Remove spaces before tabs in rtw_set_auth
Posted by Meir Elisha 1 year, 11 months ago
Remove spaces before tabs to improve coding style.

Signed-off-by: Meir Elisha <meir6264@gmail.com>
---
Changes in v3: subject and description changed, revert dead code changes
Changes in v2: remove dead code

 drivers/staging/rtl8723bs/core/rtw_mlme.c | 48 +++++++++++------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 5568215b35bd..5379393349fe 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -169,7 +169,7 @@ void _rtw_free_network(struct	mlme_priv *pmlmepriv, struct wlan_network *pnetwor
 {
 	unsigned int delta_time;
 	u32 lifetime = SCANQUEUE_LIFETIME;
-/* 	_irqL irqL; */
+/*	_irqL irqL; */
 	struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
 
 	if (!pnetwork)
@@ -389,7 +389,7 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea
 	d_cap = le16_to_cpu(tmpd);
 
 	return (src->ssid.ssid_length == dst->ssid.ssid_length) &&
-		/* 	(src->configuration.ds_config == dst->configuration.ds_config) && */
+		/* (src->configuration.ds_config == dst->configuration.ds_config) && */
 			((!memcmp(src->mac_address, dst->mac_address, ETH_ALEN))) &&
 			((!memcmp(src->ssid.ssid, dst->ssid.ssid, src->ssid.ssid_length))) &&
 			((s_cap & WLAN_CAPABILITY_IBSS) ==
@@ -627,11 +627,11 @@ void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
 }
 
 /* select the desired network based on the capability of the (i)bss. */
-/*  check items: (1) security */
-/* 			   (2) network_type */
-/* 			   (3) WMM */
-/* 			   (4) HT */
-/*                      (5) others */
+/* check items: (1) security */
+/* (2) network_type */
+/* (3) WMM */
+/* (4) HT */
+/* (5) others */
 int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwork);
 int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwork)
 {
@@ -1054,9 +1054,9 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
 			memset((u8 *)&psta->dot11rxpn, 0, sizeof(union pn48));
 		}
 
-		/* 	Commented by Albert 2012/07/21 */
-		/* 	When doing the WPS, the wps_ie_len won't equal to 0 */
-		/* 	And the Wi-Fi driver shouldn't allow the data packet to be transmitted. */
+		/* Commented by Albert 2012/07/21 */
+		/* When doing the WPS, the wps_ie_len won't equal to 0 */
+		/* And the Wi-Fi driver shouldn't allow the data packet to be transmitted. */
 		if (padapter->securitypriv.wps_ie_len != 0) {
 			psta->ieee8021x_blocked = true;
 			padapter->securitypriv.wps_ie_len = 0;
@@ -1916,10 +1916,10 @@ signed int rtw_set_auth(struct adapter *adapter, struct security_priv *psecurity
 signed int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, signed int keyid, u8 set_tx, bool enqueue)
 {
 	u8 keylen;
-	struct cmd_obj		*pcmd;
-	struct setkey_parm	*psetkeyparm;
-	struct cmd_priv 	*pcmdpriv = &(adapter->cmdpriv);
-	signed int	res = _SUCCESS;
+	struct cmd_obj *pcmd;
+	struct setkey_parm *psetkeyparm;
+	struct cmd_priv *pcmdpriv = &(adapter->cmdpriv);
+	signed int res = _SUCCESS;
 
 	psetkeyparm = rtw_zmalloc(sizeof(struct setkey_parm));
 	if (!psetkeyparm) {
@@ -2023,8 +2023,8 @@ int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_
 /*  */
 /*  Search by BSSID, */
 /*  Return Value: */
-/* 		-1		:if there is no pre-auth key in the  table */
-/* 		>= 0		:if there is pre-auth key, and   return the entry id */
+/*  -1 :if there is no pre-auth key in the  table */
+/*  >= 0 :if there is pre-auth key, and   return the entry id */
 /*  */
 /*  */
 
@@ -2187,7 +2187,7 @@ void rtw_joinbss_reset(struct adapter *padapter)
 	u8 threshold;
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
-	struct ht_priv 	*phtpriv = &pmlmepriv->htpriv;
+	struct ht_priv *phtpriv = &pmlmepriv->htpriv;
 
 	/* todo: if you want to do something io/reg/hw setting before join_bss, please add code here */
 
@@ -2213,11 +2213,11 @@ void rtw_joinbss_reset(struct adapter *padapter)
 
 void rtw_ht_use_default_setting(struct adapter *padapter)
 {
-	struct mlme_priv 	*pmlmepriv = &padapter->mlmepriv;
-	struct ht_priv 	*phtpriv = &pmlmepriv->htpriv;
+	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+	struct ht_priv *phtpriv = &pmlmepriv->htpriv;
 	struct registry_priv *pregistrypriv = &padapter->registrypriv;
-	bool		bHwLDPCSupport = false, bHwSTBCSupport = false;
-	bool		bHwSupportBeamformer = false, bHwSupportBeamformee = false;
+	bool bHwLDPCSupport = false, bHwSTBCSupport = false;
+	bool bHwSupportBeamformer = false, bHwSupportBeamformee = false;
 
 	if (pregistrypriv->wifi_spec)
 		phtpriv->bss_coexist = 1;
@@ -2288,7 +2288,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
 	u8 cbw40_enable = 0, stbc_rx_enable = 0, operation_bw = 0;
 	struct registry_priv *pregistrypriv = &padapter->registrypriv;
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-	struct ht_priv 	*phtpriv = &pmlmepriv->htpriv;
+	struct ht_priv *phtpriv = &pmlmepriv->htpriv;
 	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 
 	phtpriv->ht_option = false;
@@ -2417,7 +2417,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
 	struct ieee80211_ht_cap *pht_capie;
 	/* struct recv_reorder_ctrl *preorder_ctrl; */
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-	struct ht_priv 	*phtpriv = &pmlmepriv->htpriv;
+	struct ht_priv *phtpriv = &pmlmepriv->htpriv;
 	/* struct recv_priv *precvpriv = &padapter->recvpriv; */
 	struct registry_priv *pregistrypriv = &padapter->registrypriv;
 	/* struct wlan_network *pcur_network = &(pmlmepriv->cur_network);; */
@@ -2546,7 +2546,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
 void rtw_append_exented_cap(struct adapter *padapter, u8 *out_ie, uint *pout_len)
 {
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-	struct ht_priv 	*phtpriv = &pmlmepriv->htpriv;
+	struct ht_priv *phtpriv = &pmlmepriv->htpriv;
 	u8 cap_content[8] = {0};
 
 	if (phtpriv->bss_coexist)
-- 
2.34.1
Re: [PATCH v3] Staging: rtl8723bs: Remove spaces before tabs in rtw_set_auth
Posted by Dan Carpenter 1 year, 11 months ago
On Mon, Feb 26, 2024 at 09:52:25AM +0200, Meir Elisha wrote:
> Remove spaces before tabs to improve coding style.
> 
> Signed-off-by: Meir Elisha <meir6264@gmail.com>
> ---
> Changes in v3: subject and description changed, revert dead code changes
> Changes in v2: remove dead code
> 

Sorry that I was not clear.  This needs to be split into two patches:
[patch 1] delete dead code
[patch 2] remove spaces before tabs

regards,
dan carpenter
Re: [PATCH v3] Staging: rtl8723bs: Remove spaces before tabs in rtw_set_auth
Posted by meir elisha 1 year, 11 months ago
Hi Dan

Thanks for the response.
Not sure I got the problem here.
In V2 I removed spaces and deleted dead code. In V3 I just removed
spaces after tabs (reverting the dead code changes).
I'll want to create a seperate patch for the dead code deletion later on.
What am I missing here?

‫בתאריך יום ב׳, 26 בפבר׳ 2024 ב-12:23 מאת ‪Dan Carpenter‬‏
<‪dan.carpenter@linaro.org‬‏>:‬
>
> On Mon, Feb 26, 2024 at 09:52:25AM +0200, Meir Elisha wrote:
> > Remove spaces before tabs to improve coding style.
> >
> > Signed-off-by: Meir Elisha <meir6264@gmail.com>
> > ---
> > Changes in v3: subject and description changed, revert dead code changes
> > Changes in v2: remove dead code
> >
>
> Sorry that I was not clear.  This needs to be split into two patches:
> [patch 1] delete dead code
> [patch 2] remove spaces before tabs
>
> regards,
> dan carpenter
>
Re: [PATCH v3] Staging: rtl8723bs: Remove spaces before tabs in rtw_set_auth
Posted by Dan Carpenter 1 year, 11 months ago
On Mon, Feb 26, 2024 at 02:05:19PM +0200, meir elisha wrote:
> Hi Dan
> 
> Thanks for the response.
> Not sure I got the problem here.
> In V2 I removed spaces and deleted dead code. In V3 I just removed
> spaces after tabs (reverting the dead code changes).
> I'll want to create a seperate patch for the dead code deletion later on.
> What am I missing here?

When I'm reviewing patches, I try to be as machine like as possible.
This makes the review process more predictable.  It helps me avoid
decision fatigue.  https://www.google.com/search?q=decision+fatigue
It sucks to constantly be refusing to apply patches because I know it
makes people feel sad, but when it's part of an automatic process then
it's easier.

This patch here is a very mechanical patch which requires very little
thought, either from the person sending the patch or the person
reviewing it.  You've run into one of the common errors where you
cleaned up dead code instead of deleting it and you've recieved the
automatic response back to just delete the dead code instead of cleaning
it up.

If I hadn't responded, Greg would have said the exact same thing.

Even if you sent the patches in the wrong order:
[patch 1] fix white space
[patch 2] delete dead code
I would respond to patch 1 before reading patch 2 so if you fixed the
white space in the dead code it would still trigger an automatic
response.

I don't know why you wouldn't want to delete the dead code before
fixing the white space issues.  If you had just fixed the white space
issues in the alive code and left the dead code alone then I wouldn't
have noticed or complained.  (Best to avoid this option in case someone
*else* complains that there are still checkpatch warnings remaining).

regards,
dan carpenter