summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_priv.h
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-12-04 10:36:33 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2017-12-07 21:06:58 -0500
commit4b1d8e78615d1ab19ac85aef4d61c47f175ecf50 (patch)
tree8ebc9688c511cda5d19190808f395b898c47516e /drivers/scsi/scsi_priv.h
parenta44c9d36509c83cf64f33b93f6ab2e63822c01eb (diff)
downloadop-kernel-dev-4b1d8e78615d1ab19ac85aef4d61c47f175ecf50.zip
op-kernel-dev-4b1d8e78615d1ab19ac85aef4d61c47f175ecf50.tar.gz
scsi: core: Introduce scsi_devinfo_key enumeration type
Since symbolic names for the device information keys alread exist, associate an enumeration type with these symbolic values. This change makes it clear what the valid values for the 'key' arguments are. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.com> Cc: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_priv.h')
-rw-r--r--drivers/scsi/scsi_priv.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index a5946cd..61024db 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -45,7 +45,7 @@ static inline void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
/* scsi_devinfo.c */
/* list of keys for the lists */
-enum {
+enum scsi_devinfo_key {
SCSI_DEVINFO_GLOBAL = 0,
SCSI_DEVINFO_SPI,
};
@@ -56,13 +56,15 @@ extern blist_flags_t scsi_get_device_flags(struct scsi_device *sdev,
extern blist_flags_t scsi_get_device_flags_keyed(struct scsi_device *sdev,
const unsigned char *vendor,
const unsigned char *model,
- int key);
+ enum scsi_devinfo_key key);
extern int scsi_dev_info_list_add_keyed(int compatible, char *vendor,
char *model, char *strflags,
- blist_flags_t flags, int key);
-extern int scsi_dev_info_list_del_keyed(char *vendor, char *model, int key);
-extern int scsi_dev_info_add_list(int key, const char *name);
-extern int scsi_dev_info_remove_list(int key);
+ blist_flags_t flags,
+ enum scsi_devinfo_key key);
+extern int scsi_dev_info_list_del_keyed(char *vendor, char *model,
+ enum scsi_devinfo_key key);
+extern int scsi_dev_info_add_list(enum scsi_devinfo_key key, const char *name);
+extern int scsi_dev_info_remove_list(enum scsi_devinfo_key key);
extern int __init scsi_init_devinfo(void);
extern void scsi_exit_devinfo(void);
OpenPOWER on IntegriCloud