* [PATCH] hostap: Adjust indentation in prism2_hostapd_add_sta
@ 2019-12-18 1:15 Nathan Chancellor
2019-12-20 17:55 ` Nick Desaulniers
2020-01-26 15:36 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2019-12-18 1:15 UTC (permalink / raw)
To: Kalle Valo
Cc: linux-wireless, netdev, linux-kernel, clang-built-linux,
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.
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.")
Link: https://github.com/ClangBuiltLinux/linux/issues/813
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
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(-)
diff --git a/drivers/net/wireless/intersil/hostap/hostap_ap.c b/drivers/net/wireless/intersil/hostap/hostap_ap.c
index 0094b1d2b577..3ec46f48cfde 100644
--- a/drivers/net/wireless/intersil/hostap/hostap_ap.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_ap.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hostap: Adjust indentation in prism2_hostapd_add_sta
2019-12-18 1:15 [PATCH] hostap: Adjust indentation in prism2_hostapd_add_sta Nathan Chancellor
@ 2019-12-20 17:55 ` Nick Desaulniers
2020-01-26 15:36 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2019-12-20 17:55 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Kalle Valo, linux-wireless, Network Development, LKML, clang-built-linux
On Tue, Dec 17, 2019 at 5:15 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> 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.
>
> Fixes: ff1d2767d5a4 ("Add HostAP wireless driver.")
> Link: https://github.com/ClangBuiltLinux/linux/issues/813
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
>
> 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(-)
>
> diff --git a/drivers/net/wireless/intersil/hostap/hostap_ap.c b/drivers/net/wireless/intersil/hostap/hostap_ap.c
> index 0094b1d2b577..3ec46f48cfde 100644
> --- a/drivers/net/wireless/intersil/hostap/hostap_ap.c
> +++ b/drivers/net/wireless/intersil/hostap/hostap_ap.c
> @@ -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 clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20191218011545.40557-1-natechancellor%40gmail.com.
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hostap: Adjust indentation in prism2_hostapd_add_sta
2019-12-18 1:15 [PATCH] hostap: Adjust indentation in prism2_hostapd_add_sta Nathan Chancellor
2019-12-20 17:55 ` Nick Desaulniers
@ 2020-01-26 15:36 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2020-01-26 15:36 UTC (permalink / raw)
To: Nathan Chancellor
Cc: linux-wireless, netdev, linux-kernel, clang-built-linux,
Nathan Chancellor
Nathan Chancellor <natechancellor@gmail.com> wrote:
> 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.
>
> Fixes: ff1d2767d5a4 ("Add HostAP wireless driver.")
> Link: https://github.com/ClangBuiltLinux/linux/issues/813
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Patch applied to wireless-drivers-next.git, thanks.
b61156fba74f hostap: Adjust indentation in prism2_hostapd_add_sta
--
https://patchwork.kernel.org/patch/11299247/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-26 15:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 1:15 [PATCH] hostap: Adjust indentation in prism2_hostapd_add_sta Nathan Chancellor
2019-12-20 17:55 ` Nick Desaulniers
2020-01-26 15:36 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).