diff options
author | Kevin Barnett <kevin.barnett@microsemi.com> | 2017-05-04 02:55:37 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-13 03:48:04 +0300 |
commit | 8a994a04fc3a8edbcc0ba1d17219b6d8f4c38009 (patch) | |
tree | b969c606dd176c4dc7a06d41e702dbd317539f67 /drivers/scsi/smartpqi/smartpqi_init.c | |
parent | a9f93392415eb0fc86c29f015822b36016278c72 (diff) | |
download | linux-8a994a04fc3a8edbcc0ba1d17219b6d8f4c38009.tar.xz |
scsi: smartpqi: cleanup list initialization
Better initialization of linked list heads.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/smartpqi/smartpqi_init.c')
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi_init.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 56c416f39e3a..21fbcf368af1 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -1591,11 +1591,8 @@ static void pqi_update_device_list(struct pqi_ctrl_info *ctrl_info, struct pqi_scsi_dev *device; struct pqi_scsi_dev *next; struct pqi_scsi_dev *matching_device; - struct list_head add_list; - struct list_head delete_list; - - INIT_LIST_HEAD(&add_list); - INIT_LIST_HEAD(&delete_list); + LIST_HEAD(add_list); + LIST_HEAD(delete_list); /* * The idea here is to do as little work as possible while holding the @@ -1755,7 +1752,7 @@ static int pqi_update_scsi_devices(struct pqi_ctrl_info *ctrl_info) { int i; int rc; - struct list_head new_device_list_head; + LIST_HEAD(new_device_list_head); struct report_phys_lun_extended *physdev_list = NULL; struct report_log_lun_extended *logdev_list = NULL; struct report_phys_lun_extended_entry *phys_lun_ext_entry; @@ -1773,8 +1770,6 @@ static int pqi_update_scsi_devices(struct pqi_ctrl_info *ctrl_info) static char *out_of_memory_msg = "failed to allocate memory, device discovery stopped"; - INIT_LIST_HEAD(&new_device_list_head); - rc = pqi_get_device_lists(ctrl_info, &physdev_list, &logdev_list); if (rc) goto out; |