From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751729AbdJTG30 (ORCPT ); Fri, 20 Oct 2017 02:29:26 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:23214 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751061AbdJTG3Y (ORCPT ); Fri, 20 Oct 2017 02:29:24 -0400 X-IronPort-AV: E=Sophos;i="5.43,405,1503385200"; d="scan'208";a="6476303" X-IronPort-AV: E=McAfee;i="5900,7806,8689"; a="1465563927" X-MGA-submission: =?us-ascii?q?MDGC2K3qYt6My9SyKbIjCtTPlfrnQPriK+W4S9?= =?us-ascii?q?mYQoPXJx0t7RMAfrye7I7toJwkjsD8Y3hvwnxJxaunyD2z3SsOV3HR4l?= =?us-ascii?q?MwuzITeEqwIH9uRL6D45apiTEtuheG0zdpt46+GStJ4EcRELEuq25rrS?= =?us-ascii?q?up?= From: Kalle Valo To: Brian Norris CC: Ryan Hsu , Grant Grundler , "linux-wireless@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ath10k@lists.infradead.org" , Arnd Bergmann Subject: Re: [PATCH] ath10k: fix build errors with !CONFIG_PM Thread-Topic: [PATCH] ath10k: fix build errors with !CONFIG_PM Thread-Index: AQHTSWzDgIFpcFfYY0a2OHN/6eSQTw== Date: Fri, 20 Oct 2017 06:29:21 +0000 Message-ID: <87efpyfi2n.fsf@kamboji.qca.qualcomm.com> References: <20170919232416.108247-1-briannorris@chromium.org> <2809b2cf512d4c198d3cef3f5e468c3c@euamsexm01e.eu.qualcomm.com> <87vajbgqcz.fsf@kamboji.qca.qualcomm.com> <20171019171224.GA46096@google.com> <20171019184517.GA76422@google.com> In-Reply-To: <20171019184517.GA76422@google.com> (Brian Norris's message of "Thu, 19 Oct 2017 11:45:19 -0700") Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.251.52.12] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v9K6TqjL014013 Brian Norris writes: > Build errors have been reported with CONFIG_PM=n: > > drivers/net/wireless/ath/ath10k/pci.c:3416:8: error: implicit > declaration of function 'ath10k_pci_suspend' > [-Werror=implicit-function-declaration] > > drivers/net/wireless/ath/ath10k/pci.c:3428:8: error: implicit > declaration of function 'ath10k_pci_resume' > [-Werror=implicit-function-declaration] > > These are caused by the combination of the following two commits: > > 6af1de2e4ec4 ("ath10k: mark PM functions as __maybe_unused") > 96378bd2c6cd ("ath10k: fix core PCI suspend when WoWLAN is supported but > disabled") > > Both build fine on their own. > > But now that ath10k_pci_pm_{suspend,resume}() is compiled > unconditionally, we should also compile ath10k_pci_{suspend,resume}() > unconditionally. > > And drop the #ifdef around ath10k_pci_hif_{suspend,resume}() too; they > are trivial (empty), so we're not saving much space by compiling them > out. And the alternatives would be to sprinkle more __maybe_unused, or > spread the #ifdef's further. > > Build tested with the following combinations: > CONFIG_PM=y && CONFIG_PM_SLEEP=y > CONFIG_PM=y && CONFIG_PM_SLEEP=n > CONFIG_PM=n > > Fixes: 96378bd2c6cd ("ath10k: fix core PCI suspend when WoWLAN is > supported but disabled") > Fixes: 096ad2a15fd8 ("Merge branch 'ath-next'") > Signed-off-by: Brian Norris > --- > drivers/net/wireless/ath/ath10k/pci.c | 5 ----- > 1 file changed, 5 deletions(-) > > On Thu, Oct 19, 2017 at 10:12:25AM -0700, Brian Norris wrote: >> The solution would seem to be either to kill the #ifdefs around >> ath10k_pci_{suspend,resume}() and friends (and use __maybe_unused >> instead, to further extend Arnd's patch), or else revert Arnd's stuff >> and go with CONFIG_PM_SLEEP everywhere, which would resolve the original >> warning (promoted to error) that Arnd was resolving. >> >> I can send out one of these if you'd like. > > Here you go :) Thanks! As this an unusual merge problem between two branches I applied this manually to ath.git master-pending branch for now. Let's see if kbuild bot is happy now. -- Kalle Valo