lkml.org 
[lkml]   [2022]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: build failure of next-20220718 due to 'imx6_pcie_host_exit' defined but not used
On Mon, Jul 18, 2022 at 02:42:16PM +0200, Arnd Bergmann wrote:
> On Mon, Jul 18, 2022 at 1:58 PM Sudip Mukherjee (Codethink)
> <sudipm.mukherjee@gmail.com> 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)
> > | ^~~~~~~~~~~~~~~~~~~
> >
>
> These are called from inside an "#ifdef CONFIG_PM_SLEEP" section. The best
> fix is to remove the #ifdef and replace SET_NOIRQ_SYSTEM_SLEEP_PM_OPS()
> with the new simpler NOIRQ_SYSTEM_SLEEP_PM_OPS().

Might be simpler, but wow, it's hard to keep up with all the
permutations of sleep ops ;)

Unfortunately 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros,
deprecate old ones"), which added NOIRQ_SYSTEM_SLEEP_PM_OPS, didn't
add any hints near SET_NOIRQ_SYSTEM_SLEEP_PM_OPS.

We have several PCI controller drivers that use the "#ifdef
CONFIG_PM_SLEEP" and SET_NOIRQ_SYSTEM_SLEEP_PM_OPS pattern or the
"__maybe_unused" + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS pattern. I guess we
need to look at all of them and figure out the best practice.

Bjorn

\
 
 \ /
  Last update: 2022-07-18 18:15    [W:0.095 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site