summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_debugfs.c
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2018-04-18 02:35:07 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-21 02:14:28 +0300
commit659c1c1b29ebc4af9148eed74a9f28f00b8b6dc6 (patch)
treeb7cef1f4b4390c4ea749c4560a1fe390a1710424 /drivers/scsi/scsi_debugfs.c
parentdbef91ec5482239055dd2db8ec656fc13d382add (diff)
downloadlinux-659c1c1b29ebc4af9148eed74a9f28f00b8b6dc6.tar.xz
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_debugfs.c')
-rw-r--r--drivers/scsi/scsi_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c
index b784002ef0bd..c5a8756384bc 100644
--- a/drivers/scsi/scsi_debugfs.c
+++ b/drivers/scsi/scsi_debugfs.c
@@ -4,7 +4,7 @@
#include <scsi/scsi_dbg.h>
#include "scsi_debugfs.h"
-#define SCSI_CMD_FLAG_NAME(name) [ilog2(SCMD_##name)] = #name
+#define SCSI_CMD_FLAG_NAME(name)[const_ilog2(SCMD_##name)] = #name
static const char *const scsi_cmd_flags[] = {
SCSI_CMD_FLAG_NAME(TAGGED),
SCSI_CMD_FLAG_NAME(UNCHECKED_ISA_DMA),