]> err.no Git - linux-2.6/commitdiff
[SCSI] lpfc: minor syntax fixes
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>
Mon, 6 Mar 2006 16:20:56 +0000 (10:20 -0600)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Mon, 6 Mar 2006 16:20:56 +0000 (10:20 -0600)
Stop gcc complaining about undefined variables

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_scsi.h

index 71d2c8d3b001506b5735657693950d6687da7c9e..a2e15436730e1c55d6370ee7b80d8f0237e751a1 100644 (file)
@@ -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;
        }
 
index acd64c49e849051707f95e0a26789ca1d021750d..cdcd2535803f2f7648df3e8e99b6161806f4b551 100644 (file)
 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 :                             \