From patchwork Mon Jul 11 20:49:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9224105 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0594E604DB for ; Mon, 11 Jul 2016 20:47:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAC6027165 for ; Mon, 11 Jul 2016 20:47:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF7CA27E33; Mon, 11 Jul 2016 20:47:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7538B27165 for ; Mon, 11 Jul 2016 20:47:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbcGKUrA (ORCPT ); Mon, 11 Jul 2016 16:47:00 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:49479 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753108AbcGKUq6 (ORCPT ); Mon, 11 Jul 2016 16:46:58 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MKt72-1bMi6I1RJ2-0007zV; Mon, 11 Jul 2016 22:46:46 +0200 From: Arnd Bergmann To: Johannes Berg Cc: Arnd Bergmann , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , Kalle Valo , Eliad Peller , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iwlwifi: add missing type declaration Date: Mon, 11 Jul 2016 22:49:53 +0200 Message-Id: <20160711205020.1587254-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:IuwdUAUtZG82880ASaw6811HGo5ou9kpG0lco9vCfsdv7/Z1FJq oBglfs6C95GHfIEK6LzXG7TfviQ/Kc03FWOkhvM27nT3LvcSDSgt6mNW/V0LzKYmXxJmzFN W7pXthzCpZ4LdNnYy3P3MTtA7YrIXTBEpPw03lKObVlLmjd0lVqDZhPajboyVrT2B8txVqy GVzPxkhniFHD0lhFTC/NQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:w+f/dG51UG8=:smQZTiovPnLlusS9gl26yv VCzgIqxYWmY1/AFBZrIa71CWQlbGs3+I/47sFTbFDtO0UUSVuUlhDPDWMztS8gR0Dv3OR7Niu LocwWzy9Aug1PE0vKUv+TYO9fBwsDmdiLEo9EnTVSDn+lEW0RS3boySz485OcZLG7lnjjk3c6 ziwGNe+y+7J6pRPiM7fxkal3pzr+qcSOSSLgwM2DpFne6tuqYfGoqfo35HIzVAcbT3qj9FWnC BTnv9St4B2aOj2ZlCsTnNUQO6O4psnb2+2MK/u5Ih8eCqkIM9KSktsRz5OG9HvUD6BW9mtwob ewiuTgWYHYRjA+Ht4iI1O26SBp5zw4xnFmgEFHsYfmtJrOK9y2LpAR0FG28u/hWpOAN0EPCLE +uKFIXJoErtOOWaIIO5Az1oLhanlrH1rovqQps9qwp/m9kG1Z8uy6UbhnK+2CArN0xs/bWBPL 7/hMIv4L9v24L+c8/FVCZDqaurqnLDshLxZcR3VjpHcb6Y0mM4FPNNTtEPOOf2V4JeLsJX1QR qrpMvK4youu2z0DURxFTjpymx1TmIWdHAZfQT06vcN4xfdkSVAkoGdrx9W+hRmMU+h4eVriAw BQXW1mOjVE1MzPxJ4HwfqzmgsebkxOxbyIN8P25Ivl3wWbU9bFQtyQt61lFYOvd7Pt8zPvTs2 g+wPAd3V7h14bYEdO85axS179bDzAA4cozbhA8DlDGyyU2Ot17+RpJzmBGPAFpx0Y+VY= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);