[PATCH 45] drivers/scsi/lpfc/lpfc_init.c: kmalloc + memset conversion to kcalloc
- From: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
- Date: Tue, 31 Jul 2007 20:26:43 +0200
Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
drivers/scsi/lpfc/lpfc_init.c | 65932 -> 65881 (-51 bytes)
drivers/scsi/lpfc/lpfc_init.o | 219760 -> 219616 (-144 bytes)
drivers/scsi/lpfc/lpfc_init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/lpfc/lpfc_init.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/lpfc/lpfc_init.c 2007-07-31 11:07:59.000000000 +0200
@@ -1280,11 +1280,10 @@ lpfc_hba_init(struct lpfc_hba *phba, uin
uint32_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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
- From: Mariusz Kozlowski
- [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
- Prev by Date: [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc
- Next by Date: [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc
- Previous by thread: [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc
- Next by thread: [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc
- Index(es):