linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: mvm: Move static keyword to the front of declarations
@ 2019-08-31 22:01 Krzysztof Wilczynski
  2019-09-02  7:52 ` Luca Coelho
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Wilczynski @ 2019-08-31 22:01 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, David S. Miller, Sara Sharon,
	Shaul Triebitz, Liad Kaufman, linux-wireless, netdev,
	linux-kernel

Move the static keyword to the front of declarations of
he_if_types_ext_capa_sta and he_iftypes_ext_capa, and
resolve the following compiler warnings that can be seen
when building with warnings enabled (W=1):

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:427:1: warning:
  ‘static’ is not at beginning of declaration [-Wold-style-declaration]

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:434:1: warning:
  ‘static’ is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
---
Related: https://lore.kernel.org/r/20190827233017.GK9987@google.com

 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index d6499763f0dd..937a843fed56 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -424,14 +424,14 @@ int iwl_mvm_init_fw_regd(struct iwl_mvm *mvm)
 	return ret;
 }
 
-const static u8 he_if_types_ext_capa_sta[] = {
+static const u8 he_if_types_ext_capa_sta[] = {
 	 [0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
 	 [2] = WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT,
 	 [7] = WLAN_EXT_CAPA8_OPMODE_NOTIF,
 	 [9] = WLAN_EXT_CAPA10_TWT_REQUESTER_SUPPORT,
 };
 
-const static struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
+static const struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
 	{
 		.iftype = NL80211_IFTYPE_STATION,
 		.extended_capabilities = he_if_types_ext_capa_sta,
-- 
2.22.1


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

* Re: [PATCH] iwlwifi: mvm: Move static keyword to the front of declarations
  2019-08-31 22:01 [PATCH] iwlwifi: mvm: Move static keyword to the front of declarations Krzysztof Wilczynski
@ 2019-09-02  7:52 ` Luca Coelho
  2019-09-02 21:03   ` Krzysztof Wilczynski
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Coelho @ 2019-09-02  7:52 UTC (permalink / raw)
  To: Krzysztof Wilczynski, Kalle Valo
  Cc: Johannes Berg, Emmanuel Grumbach, Intel Linux Wireless,
	David S. Miller, Sara Sharon, Shaul Triebitz, Liad Kaufman,
	linux-wireless, netdev, linux-kernel

On Sun, 2019-09-01 at 00:01 +0200, Krzysztof Wilczynski wrote:
> Move the static keyword to the front of declarations of
> he_if_types_ext_capa_sta and he_iftypes_ext_capa, and
> resolve the following compiler warnings that can be seen
> when building with warnings enabled (W=1):
> 
> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:427:1: warning:
>   ‘static’ is not at beginning of declaration [-Wold-style-declaration]
> 
> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:434:1: warning:
>   ‘static’ is not at beginning of declaration [-Wold-style-declaration]
> 
> Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
> ---
> Related: https://lore.kernel.org/r/20190827233017.GK9987@google.com
> 
>  drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
> index d6499763f0dd..937a843fed56 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
> @@ -424,14 +424,14 @@ int iwl_mvm_init_fw_regd(struct iwl_mvm *mvm)
>  	return ret;
>  }
>  
> -const static u8 he_if_types_ext_capa_sta[] = {
> +static const u8 he_if_types_ext_capa_sta[] = {
>  	 [0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
>  	 [2] = WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT,
>  	 [7] = WLAN_EXT_CAPA8_OPMODE_NOTIF,
>  	 [9] = WLAN_EXT_CAPA10_TWT_REQUESTER_SUPPORT,
>  };
>  
> -const static struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
> +static const struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
>  	{
>  		.iftype = NL80211_IFTYPE_STATION,
>  		.extended_capabilities = he_if_types_ext_capa_sta,

Thanks for your patch! Though we already have this change in our
internal tree (submitted by YueHaibing) and it will reach the mainline
soon.

--
Cheers,
Luca.


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

* Re: [PATCH] iwlwifi: mvm: Move static keyword to the front of declarations
  2019-09-02  7:52 ` Luca Coelho
@ 2019-09-02 21:03   ` Krzysztof Wilczynski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Wilczynski @ 2019-09-02 21:03 UTC (permalink / raw)
  To: Luca Coelho
  Cc: Kalle Valo, Johannes Berg, Emmanuel Grumbach,
	Intel Linux Wireless, David S. Miller, Sara Sharon,
	Shaul Triebitz, Liad Kaufman, linux-wireless, netdev,
	linux-kernel

Hi Luca,

[...]
> Thanks for your patch! Though we already have this change in our
> internal tree (submitted by YueHaibing) and it will reach the mainline
> soon.

Thank you for letting me know.  I am glad it's fixed. :)

Krzysztof

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

* [PATCH] iwlwifi: mvm: Move static keyword to the front of declarations
@ 2019-10-12 10:41 YueHaibing
  0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2019-10-12 10:41 UTC (permalink / raw)
  To: johannes.berg, emmanuel.grumbach, luciano.coelho, linuxwifi,
	kvalo, davem, sara.sharon, shahar.s.matityahu, ilan.peer,
	liad.kaufman
  Cc: linux-wireless, netdev, linux-kernel, YueHaibing

gcc warn about this:

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:342:1:
 warning: static is not at beginning of declaration [-Wold-style-declaration]
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:349:1:
 warning: static is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index d31f96c..0358c67 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -339,14 +339,14 @@ int iwl_mvm_init_fw_regd(struct iwl_mvm *mvm)
 	return ret;
 }
 
-const static u8 he_if_types_ext_capa_sta[] = {
+static const u8 he_if_types_ext_capa_sta[] = {
 	 [0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
 	 [2] = WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT,
 	 [7] = WLAN_EXT_CAPA8_OPMODE_NOTIF,
 	 [9] = WLAN_EXT_CAPA10_TWT_REQUESTER_SUPPORT,
 };
 
-const static struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
+static const struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
 	{
 		.iftype = NL80211_IFTYPE_STATION,
 		.extended_capabilities = he_if_types_ext_capa_sta,
-- 
2.7.4



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

end of thread, other threads:[~2019-10-12 10:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-31 22:01 [PATCH] iwlwifi: mvm: Move static keyword to the front of declarations Krzysztof Wilczynski
2019-09-02  7:52 ` Luca Coelho
2019-09-02 21:03   ` Krzysztof Wilczynski
2019-10-12 10:41 YueHaibing

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).