Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440869 > unrolled thread

[PATCH] iwlwifi: add missing type declaration

Started byArnd Bergmann <arnd@arndb.de>
First post2016-07-11 22:50 +0200
Last post2016-07-12 14:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iwlwifi: add missing type declaration Arnd Bergmann <arnd@arndb.de> - 2016-07-11 22:50 +0200
    Re: [PATCH] iwlwifi: add missing type declaration Luca Coelho <luca@coelho.fi> - 2016-07-12 10:20 +0200
    Re: iwlwifi: add missing type declaration Kalle Valo <kvalo@codeaurora.org> - 2016-07-12 14:00 +0200

#1440869 — [PATCH] iwlwifi: add missing type declaration

FromArnd Bergmann <arnd@arndb.de>
Date2016-07-11 22:50 +0200
Subject[PATCH] iwlwifi: add missing type declaration
Message-ID<rTQjn-3BN-1@gated-at.bofh.it>
The iwl-debug.h header relies in implicit inclusion of linux/device.h and
we get a lot of warnings without that:

drivers/net/wireless/intel/iwlwifi/iwl-debug.h:44:23: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
 void __iwl_err(struct device *dev, bool rfkill_prefix, bool only_trace,
                       ^~~~~~
In file included from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.h:66:0,
                 from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:68:
drivers/net/wireless/intel/iwlwifi/iwl-trans.h: In function 'iwl_trans_tx':
drivers/net/wireless/intel/iwlwifi/iwl-trans.h:1030:348: error: passing argument 1 of '__iwl_err' from incompatible pointer type [-Werror=incompatible-pointer-types]
   IWL_ERR(trans, "%s bad state = %d\n", __func__, trans->state);
                                                                                                                                                                                                                                                                                                                                                            ^
In file included from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:67:0:
drivers/net/wireless/intel/iwlwifi/iwl-debug.h:44:6: note: expected 'struct device *' but argument is of type 'struct device *'
 void __iwl_err(struct device *dev, bool rfkill_prefix, bool only_trace,
      ^~~~~~~~~

The easiest workaround is to just declare 'struct device' before its first use,
rather than including the entire header file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 21cb3222fe56 ("iwlwifi: decouple PCIe transport from mac80211")
---
 drivers/net/wireless/intel/iwlwifi/iwl-debug.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-debug.h b/drivers/net/wireless/intel/iwlwifi/iwl-debug.h
index 110333208450..cd77c6971753 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-debug.h
@@ -41,6 +41,7 @@ static inline bool iwl_have_debug_level(u32 level)
 #endif
 }
 
+struct device;
 void __iwl_err(struct device *dev, bool rfkill_prefix, bool only_trace,
 		const char *fmt, ...) __printf(4, 5);
 void __iwl_warn(struct device *dev, const char *fmt, ...) __printf(2, 3);
-- 
2.9.0

[toc] | [next] | [standalone]


#1441128

FromLuca Coelho <luca@coelho.fi>
Date2016-07-12 10:20 +0200
Message-ID<rU158-2lZ-15@gated-at.bofh.it>
In reply to#1440869
On Mon, 2016-07-11 at 22:49 +0200, Arnd Bergmann wrote:
> The iwl-debug.h header relies in implicit inclusion of linux/device.h
> and
> we get a lot of warnings without that:
> 
> drivers/net/wireless/intel/iwlwifi/iwl-debug.h:44:23: error: 'struct
> device' declared inside parameter list will not be visible outside of
> this definition or declaration [-Werror]
>  void __iwl_err(struct device *dev, bool rfkill_prefix, bool
> only_trace,
>                        ^~~~~~
> In file included from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-
> read.h:66:0,
>                  from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-
> read.c:68:
> drivers/net/wireless/intel/iwlwifi/iwl-trans.h: In function
> 'iwl_trans_tx':
> drivers/net/wireless/intel/iwlwifi/iwl-trans.h:1030:348: error:
> passing argument 1 of '__iwl_err' from incompatible pointer type [-
> Werror=incompatible-pointer-types]
>    IWL_ERR(trans, "%s bad state = %d\n", __func__, trans->state);
>                                                                      
>                                                                      
>                                                                      
>                                                                      
>                                                                      
>    ^
> In file included from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-
> read.c:67:0:
> drivers/net/wireless/intel/iwlwifi/iwl-debug.h:44:6: note: expected
> 'struct device *' but argument is of type 'struct device *'
>  void __iwl_err(struct device *dev, bool rfkill_prefix, bool
> only_trace,
>       ^~~~~~~~~
> 
> The easiest workaround is to just declare 'struct device' before its
> first use,
> rather than including the entire header file.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 21cb3222fe56 ("iwlwifi: decouple PCIe transport from
> mac80211")
> ---

Acked-by: Luca Coelho <luciano.coelho@intel.com>

Agree with Kalle that he will take this directly to wireless-drivers-
next.

--
Cheers,
Luca.

[toc] | [prev] | [next] | [standalone]


#1441292 — Re: iwlwifi: add missing type declaration

FromKalle Valo <kvalo@codeaurora.org>
Date2016-07-12 14:00 +0200
SubjectRe: iwlwifi: add missing type declaration
Message-ID<rU4w2-4oy-15@gated-at.bofh.it>
In reply to#1440869
Arnd Bergmann <arnd@arndb.de> wrote:
> The iwl-debug.h header relies in implicit inclusion of linux/device.h and
> we get a lot of warnings without that:
> 
> drivers/net/wireless/intel/iwlwifi/iwl-debug.h:44:23: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>  void __iwl_err(struct device *dev, bool rfkill_prefix, bool only_trace,
>                        ^~~~~~
> In file included from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.h:66:0,
>                  from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:68:
> drivers/net/wireless/intel/iwlwifi/iwl-trans.h: In function 'iwl_trans_tx':
> drivers/net/wireless/intel/iwlwifi/iwl-trans.h:1030:348: error: passing argument 1 of '__iwl_err' from incompatible pointer type [-Werror=incompatible-pointer-types]
>    IWL_ERR(trans, "%s bad state = %d\n", __func__, trans->state);
>                                                                                                                                                                                                                                                                                                                                                             ^
> In file included from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:67:0:
> drivers/net/wireless/intel/iwlwifi/iwl-debug.h:44:6: note: expected 'struct device *' but argument is of type 'struct device *'
>  void __iwl_err(struct device *dev, bool rfkill_prefix, bool only_trace,
>       ^~~~~~~~~
> 
> The easiest workaround is to just declare 'struct device' before its first use,
> rather than including the entire header file.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 21cb3222fe56 ("iwlwifi: decouple PCIe transport from mac80211")
> Acked-by: Luca Coelho <luciano.coelho@intel.com>

Thanks, 1 patch applied to wireless-drivers-next.git:

25f700ef0653 iwlwifi: add missing type declaration

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9224105/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web