lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220719210427.GA1568454@bhelgaas>
Date:   Tue, 19 Jul 2022 16:04:27 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@...il.com>
Cc:     Richard Zhu <hongxing.zhu@....com>,
        Lucas Stach <l.stach@...gutronix.de>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Rob Herring <robh@...nel.org>, Krzysztof@...ian,
        WilczyƄski <kw@...ux.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, linux-pci@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-next@...r.kernel.org
Subject: Re: build failure of next-20220718 due to 'imx6_pcie_host_exit'
 defined but not used

On Mon, Jul 18, 2022 at 12:58:05PM +0100, Sudip Mukherjee (Codethink) wrote:
> Hi All,
> 
> Not sure if it has been reported, builds of alpha, csky, xtensa, riscv, s390 allmodsconfig
> have failed to build next-20220718 with the error:
> 
> 
> drivers/pci/controller/dwc/pci-imx6.c:973:13: error: 'imx6_pcie_host_exit' defined but not used [-Werror=unused-function]
>   973 | static void imx6_pcie_host_exit(struct dw_pcie_rp *pp)
>       |             ^~~~~~~~~~~~~~~~~~~
> drivers/pci/controller/dwc/pci-imx6.c:904:13: error: 'imx6_pcie_stop_link' defined but not used [-Werror=unused-function]
>   904 | static void imx6_pcie_stop_link(struct dw_pcie *pci)
>       |             ^~~~~~~~~~~~~~~~~~~

Thanks for the report!  I propose the following patch, which I have
tentatively applied to my pci/ctrl/imx6 branch:


commit 0e4daeaa52ca ("PCI: imx6: Convert to NOIRQ_SYSTEM_SLEEP_PM_OPS()")
Author: Bjorn Helgaas <bhelgaas@...gle.com>
Date:   Tue Jul 19 15:50:18 2022 -0500

    PCI: imx6: Convert to NOIRQ_SYSTEM_SLEEP_PM_OPS()
    
    Replace SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() with NOIRQ_SYSTEM_SLEEP_PM_OPS(),
    which has the advantage that the compiler always sees the PM callbacks as
    referenced, so they don't need to be wrapped with "#ifdef CONFIG_PM_SLEEP"
    or tagged with "__maybe_unused" to avoid "defined but not used" warnings.
    
    See 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones").
    
    Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>

diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 5ea01ed4674d..6f1dfbfc4304 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -884,7 +884,6 @@ static const struct dw_pcie_ops dw_pcie_ops = {
 	.start_link = imx6_pcie_start_link,
 };
 
-#ifdef CONFIG_PM_SLEEP
 static void imx6_pcie_ltssm_disable(struct device *dev)
 {
 	struct imx6_pcie *imx6_pcie = dev_get_drvdata(dev);
@@ -1008,11 +1007,10 @@ static int imx6_pcie_resume_noirq(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static const struct dev_pm_ops imx6_pcie_pm_ops = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx6_pcie_suspend_noirq,
-				      imx6_pcie_resume_noirq)
+	NOIRQ_SYSTEM_SLEEP_PM_OPS(imx6_pcie_suspend_noirq,
+				  imx6_pcie_resume_noirq)
 };
 
 static int imx6_pcie_probe(struct platform_device *pdev)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ