public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()
@ 2024-02-23 13:34 Shiji Yang
  2024-02-26  1:18 ` Ping-Ke Shih
  2024-02-28 11:38 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Shiji Yang @ 2024-02-23 13:34 UTC (permalink / raw)
  To: linux-wireless; +Cc: Jes Sorensen, Kalle Valo, linux-kernel, Shiji Yang

Moving struct ieee80211_sta *sta variable definition to the front
of the code to fix the ISO C90 forbids mixed declarations and code
warning.

Fixes: 43532c050f8e ("wifi: rtl8xxxu: support multiple interfaces in set_aifs()")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 6dfa060..6c03433 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -4919,11 +4919,11 @@ static void rtl8xxxu_set_aifs(struct rtl8xxxu_priv *priv, u8 slot_time)
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(priv->vifs); i++) {
+		struct ieee80211_sta *sta;
+
 		if (!priv->vifs[i])
 			continue;
 
-		struct ieee80211_sta *sta;
-
 		rcu_read_lock();
 		sta = ieee80211_find_sta(priv->vifs[i], priv->vifs[i]->bss_conf.bssid);
 		if (sta)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()
  2024-02-23 13:34 [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs() Shiji Yang
@ 2024-02-26  1:18 ` Ping-Ke Shih
  2024-02-28 11:38 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2024-02-26  1:18 UTC (permalink / raw)
  To: Shiji Yang, linux-wireless@vger.kernel.org
  Cc: Jes Sorensen, Kalle Valo, linux-kernel@vger.kernel.org



> -----Original Message-----
> From: Shiji Yang <yangshiji66@outlook.com>
> Sent: Friday, February 23, 2024 9:35 PM
> To: linux-wireless@vger.kernel.org
> Cc: Jes Sorensen <Jes.Sorensen@gmail.com>; Kalle Valo <kvalo@kernel.org>; linux-kernel@vger.kernel.org;
> Shiji Yang <yangshiji66@outlook.com>
> Subject: [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()
> 
> Moving struct ieee80211_sta *sta variable definition to the front
> of the code to fix the ISO C90 forbids mixed declarations and code
> warning.

I suppose there will be no this kind of warnings after
the commit b5ec6fd286df ("kbuild: Drop -Wdeclaration-after-statement") since
v6.5. But as commit message mentioned -- 
" It will still be recommeneded to place declarations at the start of a
  scope where possible, but it will no longer be enforced."
Then, this patch looks good to me. 

> 
> Fixes: 43532c050f8e ("wifi: rtl8xxxu: support multiple interfaces in set_aifs()")
> Signed-off-by: Shiji Yang <yangshiji66@outlook.com>

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()
  2024-02-23 13:34 [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs() Shiji Yang
  2024-02-26  1:18 ` Ping-Ke Shih
@ 2024-02-28 11:38 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2024-02-28 11:38 UTC (permalink / raw)
  To: Shiji Yang; +Cc: linux-wireless, Jes Sorensen, linux-kernel, Shiji Yang

Shiji Yang <yangshiji66@outlook.com> wrote:

> Moving struct ieee80211_sta *sta variable definition to the front
> of the code to fix the ISO C90 forbids mixed declarations and code
> warning.
> 
> Fixes: 43532c050f8e ("wifi: rtl8xxxu: support multiple interfaces in set_aifs()")
> Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-next.git, thanks.

a7e178259c5b wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/TYAP286MB03157A408E0D69F2F6FBD88ABC552@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-28 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23 13:34 [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs() Shiji Yang
2024-02-26  1:18 ` Ping-Ke Shih
2024-02-28 11:38 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox