diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-03-02 10:59:00 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-03-05 17:07:46 -0500 |
commit | fddbeb80a904aae41c84ed566e2b0d1de55907df (patch) | |
tree | 49d3b14ce7bf24015c8c3a7ac10c8f8f5d1055f0 /drivers/scsi/mvumi.c | |
parent | 8063d56efa7f7a3e8a2776addfed1874785c74f0 (diff) |
scsi: mvumi: use __maybe_unused to hide pm functions
The mvumi scsi hides the references to its suspend/resume functions in
an #ifdef but does not hide the implementation the same way:
drivers/scsi/mvumi.c:2632:12: error: 'mvumi_suspend' defined but not used [-Werror=unused-function]
drivers/scsi/mvumi.c:2651:12: error: 'mvumi_resume' defined but not used [-Werror=unused-function]
This adds __maybe_unused annotations so the compiler knows it can
silently drop them instead of warning, while avoiding the addition of
another #ifdef.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mvumi.c')
-rw-r--r-- | drivers/scsi/mvumi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 02360de6b7e0..39285070f3b5 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c | |||
@@ -2629,7 +2629,7 @@ static void mvumi_shutdown(struct pci_dev *pdev) | |||
2629 | mvumi_flush_cache(mhba); | 2629 | mvumi_flush_cache(mhba); |
2630 | } | 2630 | } |
2631 | 2631 | ||
2632 | static int mvumi_suspend(struct pci_dev *pdev, pm_message_t state) | 2632 | static int __maybe_unused mvumi_suspend(struct pci_dev *pdev, pm_message_t state) |
2633 | { | 2633 | { |
2634 | struct mvumi_hba *mhba = NULL; | 2634 | struct mvumi_hba *mhba = NULL; |
2635 | 2635 | ||
@@ -2648,7 +2648,7 @@ static int mvumi_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2648 | return 0; | 2648 | return 0; |
2649 | } | 2649 | } |
2650 | 2650 | ||
2651 | static int mvumi_resume(struct pci_dev *pdev) | 2651 | static int __maybe_unused mvumi_resume(struct pci_dev *pdev) |
2652 | { | 2652 | { |
2653 | int ret; | 2653 | int ret; |
2654 | struct mvumi_hba *mhba = NULL; | 2654 | struct mvumi_hba *mhba = NULL; |