OSDN Git Service

scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
authorLee Jones <lee.jones@linaro.org>
Tue, 7 Jul 2020 14:00:48 +0000 (15:00 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 8 Jul 2020 05:12:44 +0000 (01:12 -0400)
commit4be1fa2b55a8be8fc6779a556d00d833878132c3
treee2bbe5b5981b96223600f17aa789e1a3698037ee
parenta23064c4123b2422d587f97182798a29f3dd3f2d
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>
drivers/scsi/fdomain.h