From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Arnd Bergmann <arnd@kernel.org>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Josue David Hernandez Gutierrez
<josue.d.hernandez.gutierrez@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals
Date: Thu, 30 Mar 2023 14:11:44 +0300 [thread overview]
Message-ID: <2e727403-a566-8c48-9367-5daa7c87def7@linux.intel.com> (raw)
In-Reply-To: <20230328131114.1296430-1-arnd@kernel.org>
On 28.3.2023 16.10, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> A recent patch caused an unused-function warning in builds with
> CONFIG_PM disabled, after the function became marked 'static':
>
> drivers/usb/host/xhci-pci.c:91:13: error: 'xhci_msix_sync_irqs' defined but not used [-Werror=unused-function]
> 91 | static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
> | ^~~~~~~~~~~~~~~~~~~
>
> This could be solved by adding another #ifdef, but as there is
> a trend towards removing CONFIG_PM checks in favor of helper
> macros, do the same conversion here and use pm_ptr() to get
> either a function pointer or NULL but avoid the warning.
>
> As the hidden functions reference some other symbols, make
> sure those are visible at compile time, at the minimal cost of
> a few extra bytes for 'struct usb_device'.
>
> Fixes: 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for this.
Looks like Greg already picked it.
-Mathias
prev parent reply other threads:[~2023-03-30 11:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 13:10 [PATCH] xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals Arnd Bergmann
2023-03-30 11:11 ` Mathias Nyman [this message]
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=2e727403-a566-8c48-9367-5daa7c87def7@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=josue.d.hernandez.gutierrez@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=stern@rowland.harvard.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox