From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751506AbcGLIOz (ORCPT ); Tue, 12 Jul 2016 04:14:55 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:34502 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750787AbcGLIOv (ORCPT ); Tue, 12 Jul 2016 04:14:51 -0400 Message-ID: <1468311283.25088.129.camel@coelho.fi> From: Luca Coelho To: Arnd Bergmann , Johannes Berg , kvalo Cc: Emmanuel Grumbach , Intel Linux Wireless , Kalle Valo , Eliad Peller , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 12 Jul 2016 11:14:43 +0300 In-Reply-To: <20160711205020.1587254-1-arnd@arndb.de> References: <20160711205020.1587254-1-arnd@arndb.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 192.40.95.8 X-SA-Exim-Mail-From: luca@coelho.fi Subject: Re: [PATCH] iwlwifi: add missing type declaration X-SA-Exim-Version: 4.2.1 (built Mon, 06 Jul 2015 07:28:29 +0000) X-SA-Exim-Scanned: Yes (on farmhouse.coelho.fi) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Fixes: 21cb3222fe56 ("iwlwifi: decouple PCIe transport from > mac80211") > --- Acked-by: Luca Coelho Agree with Kalle that he will take this directly to wireless-drivers- next. -- Cheers, Luca.