hostap: Adjust indentation in prism2_hostapd_add_sta
Subsystems (3)
PATCH 1/1 hostap: Adjust indentation in prism2_hostapd_add_sta
Clang warns:
../drivers/net/wireless/intersil/hostap/hostap_ap.c:2511:3: warning:
misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
if (sta->tx_supp_rates & WLAN_RATE_5M5)
^
../drivers/net/wireless/intersil/hostap/hostap_ap.c:2509:2: note:
previous statement is here
if (sta->tx_supp_rates & WLAN_RATE_2M)
^1 warning generated.
This warning occurs because there is a space before the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns.
---
Sorry for sending a patch for an "Obselete" driver (especially one as trivial as this) but it is still a warning from clang and shows up on all{yes,mod}config.
drivers/net/wireless/intersil/hostap/hostap_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intersil/hostap/hostap_ap.c +1 -1
@@ -2508,7 +2508,7 @@ static int prism2_hostapd_add_sta(struct ap_data *ap, sta->supported_rates[0 ] =2 ;if (sta->tx_supp_rates &WLAN_RATE_2M ) sta->supported_rates[1 ] =4 ; -if (sta->tx_supp_rates &WLAN_RATE_5M5 ) +if (sta->tx_supp_rates &WLAN_RATE_5M5 ) sta->supported_rates[2 ] =11 ;if (sta->tx_supp_rates &WLAN_RATE_11M ) sta->supported_rates[3 ] =22 ;
Signature · 1 line
2.24.1
Quoted 14 lines · Nathan Chancellor
Clang warns:
../drivers/net/wireless/intersil/hostap/hostap_ap.c:2511:3: warning:
misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]if (sta->tx_supp_rates & WLAN_RATE_5M5) ^ ../drivers/net/wireless/intersil/hostap/hostap_ap.c:2509:2: note: previous statement is here if (sta->tx_supp_rates & WLAN_RATE_2M) ^1 warning generated.
Quoted 7 lines
This warning occurs because there is a space before the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns.
Fixes ff1d2767d5a4 ("Add HostAP wireless driver.")Signed-off-by Nathan Chancellor <[email protected]>
Thanks for the patch!
Quoted 29 lines
---
Sorry for sending a patch for an "Obselete" driver (especially one as trivial as this) but it is still a warning from clang and shows up on all{yes,mod}config.
drivers/net/wireless/intersil/hostap/hostap_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/intersil/hostap/hostap_ap.c +1
-2@@ -2508,7 +2508,7 @@ static int prism2_hostapd_add_sta(struct ap_data *ap, sta->supported_rates[0 ] =2 ;if (sta->tx_supp_rates &WLAN_RATE_2M ) sta->supported_rates[1 ] =4 ; -if (sta->tx_supp_rates &WLAN_RATE_5M5 ) +if (sta->tx_supp_rates &WLAN_RATE_5M5 ) sta->supported_rates[2 ] =11 ;if (sta->tx_supp_rates &WLAN_RATE_11M ) sta->supported_rates[3 ] =22 ; --2.24.1
--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20191218011545.40557-1-natechancellor%40gmail.com.
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 13 lines · Nathan Chancellor
Clang warns:
../drivers/net/wireless/intersil/hostap/hostap_ap.c:2511:3: warning:
misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]if (sta->tx_supp_rates & WLAN_RATE_5M5) ^ ../drivers/net/wireless/intersil/hostap/hostap_ap.c:2509:2: note: previous statement is here if (sta->tx_supp_rates & WLAN_RATE_2M) ^1 warning generated.
Quoted 8 lines
This warning occurs because there is a space before the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns.
Fixes ff1d2767d5a4 ("Add HostAP wireless driver.")Signed-off-by Nathan Chancellor <[email protected]>Reviewed-by Nick Desaulniers <[email protected]>
Patch applied to wireless-drivers-next.git, thanks.
b61156fba74f hostap: Adjust indentation in prism2_hostapd_add_sta
Signature · 3 lines
https://patchwork.kernel.org/patch/11299247/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches