diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.h b/drivers/scsi/lpfc/lpfc_scsi.h index acd64c49e849..cdcd2535803f 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.h +++ b/drivers/scsi/lpfc/lpfc_scsi.h | |||
@@ -23,10 +23,13 @@ | |||
23 | struct lpfc_hba; | 23 | struct lpfc_hba; |
24 | 24 | ||
25 | #define list_remove_head(list, entry, type, member) \ | 25 | #define list_remove_head(list, entry, type, member) \ |
26 | do { \ | ||
27 | entry = NULL; \ | ||
26 | if (!list_empty(list)) { \ | 28 | if (!list_empty(list)) { \ |
27 | entry = list_entry((list)->next, type, member); \ | 29 | entry = list_entry((list)->next, type, member); \ |
28 | list_del_init(&entry->member); \ | 30 | list_del_init(&entry->member); \ |
29 | } | 31 | } \ |
32 | } while(0) | ||
30 | 33 | ||
31 | #define list_get_first(list, type, member) \ | 34 | #define list_get_first(list, type, member) \ |
32 | (list_empty(list)) ? NULL : \ | 35 | (list_empty(list)) ? NULL : \ |