]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: smartpqi: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Thu, 18 May 2017 08:32:18 +0000 (10:32 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 26 Jul 2017 04:07:04 +0000 (21:07 -0700)
commit91e0fe3bdce5ed64a0bd5cb56e3d736d385298eb
tree54017db293d0080722117b0760304efd1c0c7242
parent7e168b9aadef67eba325327b6675369981b96d58
scsi: smartpqi: mark PM functions as __maybe_unused

Orabug: 2619102126447813

The newly added suspend/resume support causes harmless warnings when
CONFIG_PM is disabled:

smartpqi/smartpqi_init.c:5147:12: error: 'pqi_ctrl_wait_for_pending_io' defined but not used [-Werror=unused-function]
smartpqi/smartpqi_init.c:2019:13: error: 'pqi_wait_until_lun_reset_finished' defined but not used [-Werror=unused-function]
smartpqi/smartpqi_init.c:2013:13: error: 'pqi_wait_until_scan_finished' defined but not used [-Werror=unused-function]

We can avoid the warnings by removing the #ifdef around the handlers and
instead marking them as __maybe_unused, which will let gcc drop the
unused code silently.

Fixes: f44d210312a6 ("scsi: smartpqi: add suspend and resume support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 5c146686e32085e76ad9e2957f3dee9b28fe4f22)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/smartpqi/smartpqi_init.c