All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com>,
	"Richard Zhu" <hongxing.zhu@nxp.com>,
	"Lucas Stach" <l.stach@pengutronix.de>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Rob Herring" <robh@kernel.org>, Wilczyński <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	linux-pci <linux-pci@vger.kernel.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux-Next Mailing List" <linux-next@vger.kernel.org>
Subject: Re: build failure of next-20220718 due to 'imx6_pcie_host_exit' defined but not used
Date: Mon, 18 Jul 2022 11:14:39 -0500	[thread overview]
Message-ID: <20220718161439.GA1419930@bhelgaas> (raw)
In-Reply-To: <CAK8P3a0MYMbRk1tVmWUBWfnD-1Z5P3fE+DvNycnXaffzqc3htw@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com>,
	"Richard Zhu" <hongxing.zhu@nxp.com>,
	"Lucas Stach" <l.stach@pengutronix.de>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Rob Herring" <robh@kernel.org>, Wilczyński <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	linux-pci <linux-pci@vger.kernel.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux-Next Mailing List" <linux-next@vger.kernel.org>
Subject: Re: build failure of next-20220718 due to 'imx6_pcie_host_exit' defined but not used
Date: Mon, 18 Jul 2022 11:14:39 -0500	[thread overview]
Message-ID: <20220718161439.GA1419930@bhelgaas> (raw)
In-Reply-To: <CAK8P3a0MYMbRk1tVmWUBWfnD-1Z5P3fE+DvNycnXaffzqc3htw@mail.gmail.com>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-07-18 16:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18 11:58 build failure of next-20220718 due to 'imx6_pcie_host_exit' defined but not used Sudip Mukherjee (Codethink)
2022-07-18 11:58 ` Sudip Mukherjee (Codethink)
2022-07-18 12:42 ` Arnd Bergmann
2022-07-18 12:42   ` Arnd Bergmann
2022-07-18 16:14   ` Bjorn Helgaas [this message]
2022-07-18 16:14     ` Bjorn Helgaas
2022-07-19  7:52     ` Arnd Bergmann
2022-07-19  7:52       ` Arnd Bergmann
2022-07-19 21:04 ` Bjorn Helgaas
2022-07-19 21:04   ` Bjorn Helgaas
2022-07-19 21:16   ` Arnd Bergmann
2022-07-19 21:16     ` Arnd Bergmann
2022-07-19 21:47     ` Bjorn Helgaas
2022-07-19 21:47       ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220718161439.GA1419930@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=hongxing.zhu@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=kw@linux.com \
    --cc=l.stach@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.