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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 25 Jul 2022 10:45:20 +0800
From:   Ren Zhijie <renzhijie2@...wei.com>
To:     Arnd Bergmann <arnd@...db.de>
CC:     Richard Zhu <hongxing.zhu@....com>,
        Lucas Stach <l.stach@...gutronix.de>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Rob Herring <robh@...nel.org>,
        Krzysztof Wilczyński <kw@...ux.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        linux-pci <linux-pci@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] PCI: imx6: Fix build error unused-function

在 2022/7/24 23:40, Arnd Bergmann 写道:
> On Sun, Jul 24, 2022 at 12:13 PM Ren Zhijie <renzhijie2@...wei.com> wrote:
>> If CONFIG_PM_SLEEP is not set,
>> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will be failed, like this:
>>
>> drivers/pci/controller/dwc/pci-imx6.c:973:13: error: ‘imx6_pcie_host_exit’ defined but not used [-Werror=unused-function]
>>   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]
>>   static void imx6_pcie_stop_link(struct dw_pcie *pci)
>>               ^~~~~~~~~~~~~~~~~~~
>> cc1: all warnings being treated as errors
>> make[4]: *** [drivers/pci/controller/dwc/pci-imx6.o] Error 1
>>
>> These two functions imx6_pcie_host_exit() and imx6_pcie_stop_link() only be called by imx6_pcie_suspend_noirq(), which was warpped by CONFIG_PM_SLEEP.
>> To fix build error unused-function, use __maybe_unused to attach them.
>>
>> Fixes: 25ae5434c3de ("PCI: imx6: Reformat suspend callback to keep symmetric with resume")
>> Signed-off-by: Ren Zhijie <renzhijie2@...wei.com>
> There is already a better fix for this, see
> https://lore.kernel.org/all/20220719210427.GA1568454@bhelgaas/
>
> If you come across other suspend/resume functions that trigger the
> unused-function
> warning, please use the same method there instead of adding __maybe_unused
> or #ifdef annotations.
>
>        Arnd

Hi, Arnd

Thanks for your reply. I have actually met the other warning, and I use 
the new  marco RUNTIME_PM_OPS to replace the old one,see

https://lore.kernel.org/all/20220725023611.57055-1-renzhijie2@huawei.com/


Thanks,

Ren Zhijie

> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ