drivers/scsi/lpfc/lpfc_init.c: kmalloc + memset conversion to kcalloc
Subsystems (2)
PATCH 22/30 drivers/scsi/lpfc/lpfc_init.c: kmalloc + memset conversion to kcalloc
From: Mariusz Kozlowski <[email protected]>
drivers/scsi/lpfc/lpfc_init.c | 65932 -> 65881 (-51 bytes) drivers/scsi/lpfc/lpfc_init.o | 219760 -> 219616 (-144 bytes)
Signed-off-by Mariusz Kozlowski <[email protected]>
Acked-by James Smart <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/lpfc/lpfc_init.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_init.c renamed from drivers/scsi/lpfc/lpfc_init.c~drivers-scsi-lpfc-lpfc_initc-kmalloc-memset-conversion-to-kcalloc +1 -2
@@ -1265,11 +1265,10 @@ lpfc_hba_init(struct lpfc_hba *phba, uinuint32_t *HashWorking;uint32_t *pwwnn = (uint32_t *) phba->wwnn; - HashWorking =kmalloc (80 *sizeof (uint32_t ),GFP_KERNEL ); + HashWorking =kcalloc (80 ,sizeof (uint32_t ),GFP_KERNEL );if (!HashWorking)return ; -memset (HashWorking,0 , (80 *sizeof (uint32_t ))); HashWorking[0 ] = HashWorking[78 ] = *pwwnn++; HashWorking[1 ] = HashWorking[79 ] = *pwwnn;
_