aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fdomain.h
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2020-07-07 15:00:48 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-07-08 01:12:44 -0400
commit4be1fa2b55a8be8fc6779a556d00d833878132c3 (patch)
treee2bbe5b5981b96223600f17aa789e1a3698037ee /drivers/scsi/fdomain.h
parentscsi: ufs: Change upiu_flags to be u8 (diff)
downloadlinux-dev-4be1fa2b55a8be8fc6779a556d00d833878132c3.tar.xz
linux-dev-4be1fa2b55a8be8fc6779a556d00d833878132c3.zip
scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
Not all source files which include 'fdomain.h' make use of 'fdomain_pm_ops' leaving them defined but unused. Mark it as __maybe_unused to tell the compiler this is not only acceptable, but expected. Fixes the following W=1 kernel build warning(s): In file included from drivers/scsi/pcmcia/fdomain_cs.c:16: drivers/scsi/fdomain.h:106:32: warning: ‘fdomain_pm_ops’ defined but not used [-Wunused-const-variable=] 106 | static const struct dev_pm_ops fdomain_pm_ops; | ^~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200707140055.2956235-4-lee.jones@linaro.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/fdomain.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/fdomain.h b/drivers/scsi/fdomain.h
index 6f63fc6b0d12..93afcee207ae 100644
--- a/drivers/scsi/fdomain.h
+++ b/drivers/scsi/fdomain.h
@@ -103,7 +103,7 @@ enum {
#define REG_FIFO_COUNT 14 /* R: FIFO Data Count */
#ifdef CONFIG_PM_SLEEP
-static const struct dev_pm_ops fdomain_pm_ops;
+static const struct dev_pm_ops __maybe_unused fdomain_pm_ops;
#define FDOMAIN_PM_OPS (&fdomain_pm_ops)
#else
#define FDOMAIN_PM_OPS NULL