Skip to content

Commit fddbeb8

Browse files
arndbmartinkpetersen
authored andcommitted
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>
1 parent 8063d56 commit fddbeb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/mvumi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,7 @@ static void mvumi_shutdown(struct pci_dev *pdev)
26292629
mvumi_flush_cache(mhba);
26302630
}
26312631

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)
26332633
{
26342634
struct mvumi_hba *mhba = NULL;
26352635

@@ -2648,7 +2648,7 @@ static int mvumi_suspend(struct pci_dev *pdev, pm_message_t state)
26482648
return 0;
26492649
}
26502650

2651-
static int mvumi_resume(struct pci_dev *pdev)
2651+
static int __maybe_unused mvumi_resume(struct pci_dev *pdev)
26522652
{
26532653
int ret;
26542654
struct mvumi_hba *mhba = NULL;

0 commit comments

Comments
 (0)