Commit 9734fd7
xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals
commit 130eac4 upstream.
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: 9abe15d ("xhci: Move xhci MSI sync function to to xhci-pci")
Signed-off-by: Arnd Bergmann <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent d208571 commit 9734fd7
3 files changed
+2
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
575 | 574 | | |
576 | 575 | | |
577 | 576 | | |
| |||
721 | 720 | | |
722 | 721 | | |
723 | 722 | | |
724 | | - | |
725 | 723 | | |
726 | 724 | | |
727 | 725 | | |
| |||
763 | 761 | | |
764 | 762 | | |
765 | 763 | | |
766 | | - | |
767 | 764 | | |
768 | | - | |
| 765 | + | |
769 | 766 | | |
770 | | - | |
771 | 767 | | |
772 | 768 | | |
773 | 769 | | |
774 | 770 | | |
775 | 771 | | |
776 | | - | |
777 | 772 | | |
778 | 773 | | |
779 | 774 | | |
780 | | - | |
781 | 775 | | |
782 | 776 | | |
783 | 777 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
700 | | - | |
701 | 700 | | |
702 | 701 | | |
703 | 702 | | |
704 | 703 | | |
705 | 704 | | |
706 | | - | |
| 705 | + | |
707 | 706 | | |
708 | 707 | | |
709 | 708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | 489 | | |
491 | | - | |
492 | 490 | | |
493 | 491 | | |
494 | 492 | | |
| |||
0 commit comments