summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2018-04-18 01:35:07 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-21 01:14:28 +0200
commit659c1c1b29ebc4af9148eed74a9f28f00b8b6dc6 (patch)
treeb7cef1f4b4390c4ea749c4560a1fe390a1710424 /drivers/scsi/scsi_sysfs.c
parentscsi: ilog2: create truly constant version for sparse (diff)
downloadlinux-659c1c1b29ebc4af9148eed74a9f28f00b8b6dc6.tar.xz
linux-659c1c1b29ebc4af9148eed74a9f28f00b8b6dc6.zip
scsi: devinfo: use const_ilog2 for array indices
Use the just introduced const_ilog2() macro to avoid sparse errors. Signed-off-by: Martin Wilck <mwilck@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 1e36c9a9ad17..5120e613a29c 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -968,7 +968,7 @@ sdev_show_wwid(struct device *dev, struct device_attribute *attr,
static DEVICE_ATTR(wwid, S_IRUGO, sdev_show_wwid, NULL);
#define BLIST_FLAG_NAME(name) \
- [ilog2((__force unsigned int)BLIST_##name)] = #name
+ [const_ilog2((__force unsigned int)BLIST_##name)] = #name
static const char *const sdev_bflags_name[] = {
#include "scsi_devinfo_tbl.c"
};