From patchwork Thu Oct 19 18:45:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 10018171 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 732B060224 for ; Thu, 19 Oct 2017 18:45:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6720428E2D for ; Thu, 19 Oct 2017 18:45:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B85C28E2F; Thu, 19 Oct 2017 18:45:55 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EB6C428E2D for ; Thu, 19 Oct 2017 18:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lLECO58+4+zKR97NHGiSReUsc2QCzFWhMwlXx/wO+S8=; b=IydBWd7t3FaRBt UnQjYtBj+PamyogylCJQZZp1HTTf6cnNHw8QkVagi4w0sgCxQUkMtVCyrKOyaXau3oB28uoZNoky6 +y0EaOLm3y1ss9GY+CJdfm4bXxmqstRlYfX756CRcpbab/ZPuxWZLx0NCJLOKYKsQjSR8nABAsmeD 7xVssFesJ4XrB+F3f+c4XQPyK6mQ0ACWSWHwgfm1MLAb7Ql7lb/eudRuUUZGe5nuEvRwF5oMNXC63 XrYVUUddTugdWAtIsv3/SKP27gbNwFDCgZjlLqsymA2uhcdPJQIXju0A8YMC2ZBrLLMYVNyeRoF3H SjyrqiGNxC2fEKNn+trQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e5FpD-0001eS-Po; Thu, 19 Oct 2017 18:45:47 +0000 Received: from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e5Fp9-0001Qy-Dg for ath10k@lists.infradead.org; Thu, 19 Oct 2017 18:45:45 +0000 Received: by mail-io0-x241.google.com with SMTP id h70so10855843ioi.4 for ; Thu, 19 Oct 2017 11:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UPXeaZgB7V0rLhcHio72yCdiPyaBcYoMSDDJoO+xlrI=; b=aqi4sGSlHRqtEXlL3WAvIpqmOO/+8yX5qn2sk6izlYAa5iWo/n2QWyB22/hUJ3lS2r qypac5QXW+nY7OawQCKHI1f1ynoaeLmGzXqkJDqIjlb4hQYHISIFq9BCeQMm6K3WyRBa 2CCd0K/EUgGgrtfbMlxLy54EouI3jlB3kGY2Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UPXeaZgB7V0rLhcHio72yCdiPyaBcYoMSDDJoO+xlrI=; b=H0E7hBa+zZvipHvvoon+Ug8E46iPsYQDwMqQCw+Rr+IV+Af9xuudEWICi/NhGKbuvO mnFwMW+zwm1r+t2z3+BZnzGmVxSkeV6pUjAWbvHwe9/b+moz2fhjTCn5Ip0pbhQdEWPt QO3HdwHhvUCWoZa7wqaFkgRbjbgaGuWn2A+KKpV1H4INYO/ggLnb3aEJ1rInf4cdOq1K Uzz47LcdEPWTv8hAo83CWM+e5WSD5/Swi6yaJsL2GxStlxo0HFZxCdDhzrXJGq6HoEzR WDlPhxem9dvY+u2h3exktQQLwY+TcIhmOzmKMuDkxM/PayYQF3k+oVlPxEDjb9nDr7n4 Xiag== X-Gm-Message-State: AMCzsaVDGnfW4G/9pyI2T5LKdRd5Yx8gqnBtaY13p4zzmu2OQUPd/xVS DDjPzx2H1FktlUdtSBPOrgVdKw== X-Google-Smtp-Source: ABhQp+QEEhhQ//opgIPX2oGLL5PUHqcha69TnzRmn2GvtEn/fVHIZa7y1G5aWxFLMIiTcfEKdEuncg== X-Received: by 10.107.1.198 with SMTP id 189mr2933986iob.75.1508438722436; Thu, 19 Oct 2017 11:45:22 -0700 (PDT) Received: from google.com ([2620:0:1000:1600:41a3:7beb:9a9d:6d9]) by smtp.gmail.com with ESMTPSA id y132sm5655893ioy.69.2017.10.19.11.45.20 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 19 Oct 2017 11:45:21 -0700 (PDT) Date: Thu, 19 Oct 2017 11:45:19 -0700 From: Brian Norris To: Kalle Valo Subject: [PATCH] ath10k: fix build errors with !CONFIG_PM Message-ID: <20171019184517.GA76422@google.com> References: <20170919232416.108247-1-briannorris@chromium.org> <2809b2cf512d4c198d3cef3f5e468c3c@euamsexm01e.eu.qualcomm.com> <87vajbgqcz.fsf@kamboji.qca.qualcomm.com> <20171019171224.GA46096@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171019171224.GA46096@google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171019_114543_638427_C4CBA04F X-CRM114-Status: GOOD ( 14.00 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ryan Hsu , Arnd Bergmann , Grant Grundler , "linux-wireless@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ath10k@lists.infradead.org" Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 :) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index b18a9b690df4..d790ea20b95d 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -2577,8 +2577,6 @@ void ath10k_pci_hif_power_down(struct ath10k *ar) */ } -#ifdef CONFIG_PM - static int ath10k_pci_hif_suspend(struct ath10k *ar) { /* Nothing to do; the important stuff is in the driver suspend. */ @@ -2627,7 +2625,6 @@ static int ath10k_pci_resume(struct ath10k *ar) return ret; } -#endif static bool ath10k_pci_validate_cal(void *data, size_t size) { @@ -2782,10 +2779,8 @@ static const struct ath10k_hif_ops ath10k_pci_hif_ops = { .power_down = ath10k_pci_hif_power_down, .read32 = ath10k_pci_read32, .write32 = ath10k_pci_write32, -#ifdef CONFIG_PM .suspend = ath10k_pci_hif_suspend, .resume = ath10k_pci_hif_resume, -#endif .fetch_cal_eeprom = ath10k_pci_hif_fetch_cal_eeprom, };