RE: [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()

From: Ping-Ke Shih
Date: Sun Feb 25 2024 - 20:18:44 EST




> -----Original Message-----
> From: Shiji Yang <yangshiji66@xxxxxxxxxxx>
> Sent: Friday, February 23, 2024 9:35 PM
> To: linux-wireless@xxxxxxxxxxxxxxx
> Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx>; Kalle Valo <kvalo@xxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx;
> Shiji Yang <yangshiji66@xxxxxxxxxxx>
> 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@xxxxxxxxxxx>

Reviewed-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>