Skip to contentSkip to conversation

staging: rtl8723bs: use block-scoped loop variable in rtw_ap.c

PATCH In review Dharanitharan R 2 participants 3 messages Feb 10 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8723bs: use block-scoped loop variable in rtw_ap.c

Convert the loop iterator to a block-scoped declaration using C99-style for-loop initialization.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +1 -2
index 67197c7d4a4d..919bf8db6002 100644
@@ -178,7 +178,6 @@ void expire_timeout_chk(struct adapter *padapter)
 	struct sta_priv *pstapriv = &padapter->stapriv;
 	u8 chk_alive_num = 0;
 	char chk_alive_list[NUM_STA];
-	int i;
 
 	spin_lock_bh(&pstapriv->auth_list_lock);
 
@@ -278,7 +277,7 @@ void expire_timeout_chk(struct adapter *padapter)
 		}
 
 		/* issue null data to check sta alive*/
-		for (i = 0; i < chk_alive_num; i++) {
+		for (int i = 0; i < chk_alive_num; i++) {
 			int ret = _FAIL;
 
 			psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 2 lines · Dharanitharan R

Convert the loop iterator to a block-scoped declaration using C99-style for-loop initialization.

No need for this to be changed at this point in time, just do that for new code please. What tool said that this should be changed?

thanks,

greg k-h

maintainer
#2 lore raw
In reply to Dharanitharan R
Quoted 33 lines · Dharanitharan R

Convert the loop iterator to a block-scoped declaration using C99-style for-loop initialization.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +1 -2
index 67197c7d4a4d..919bf8db6002 100644
@@ -178,7 +178,6 @@ void expire_timeout_chk(struct adapter *padapter)
 	struct sta_priv *pstapriv = &padapter->stapriv;
 	u8 chk_alive_num = 0;
 	char chk_alive_list[NUM_STA];
-	int i;
 
 	spin_lock_bh(&pstapriv->auth_list_lock);
 
@@ -278,7 +277,7 @@ void expire_timeout_chk(struct adapter *padapter)
 		}
 
 		/* issue null data to check sta alive*/
-		for (i = 0; i < chk_alive_num; i++) {
+		for (int i = 0; i < chk_alive_num; i++) {
 			int ret = _FAIL;
 
 			psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
Signature · 1 line
2.43.0

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.

You are receiving this message because of the following common error(s) as indicated below:

- This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.

thanks,

greg k-h's patch email bot