From: James Bottomley Date: Mon, 6 Mar 2006 16:20:56 +0000 (-0600) Subject: [SCSI] lpfc: minor syntax fixes X-Git-Tag: v2.6.17-rc1~1129^2~4^2~78 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=286fc8f8ea7ef58b54f150fc900ce019af483e89;p=linux-2.6 [SCSI] lpfc: minor syntax fixes Stop gcc complaining about undefined variables Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 71d2c8d3b0..a2e1543673 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -948,10 +948,12 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) "10-port ", "PCIe"}; break; default: + m = (typeof(m)){ 0 }; break; } break; default: + m = (typeof(m)){ 0 }; break; } diff --git a/drivers/scsi/lpfc/lpfc_scsi.h b/drivers/scsi/lpfc/lpfc_scsi.h index acd64c49e8..cdcd253580 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.h +++ b/drivers/scsi/lpfc/lpfc_scsi.h @@ -23,10 +23,13 @@ struct lpfc_hba; #define list_remove_head(list, entry, type, member) \ + do { \ + entry = NULL; \ if (!list_empty(list)) { \ entry = list_entry((list)->next, type, member); \ list_del_init(&entry->member); \ - } + } \ + } while(0) #define list_get_first(list, type, member) \ (list_empty(list)) ? NULL : \