diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-08-11 04:13:24 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:41:00 -0400 |
commit | bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022 (patch) | |
tree | f7e3d50cda2e3d55bff88c2cc617d60df8ddb2cb /drivers/scsi/lpfc | |
parent | f36789e22ac32a6554b8e4d05ab6125fc1161745 (diff) |
[SCSI] kmalloc + memset conversion to kzalloc
In NCR_D700, a4000t, aic7xxx_old, bvme6000, dpt_i2o, gdth, lpfc,
megaraid, mvme16x osst, pluto, qla2xxx, zorro7xx
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_debugfs.c | 4 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 3 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 3 |
3 files changed, 3 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index dcf808be0fb0..149fdd25f8e8 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c | |||
@@ -901,7 +901,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
901 | } | 901 | } |
902 | } | 902 | } |
903 | 903 | ||
904 | vport->disc_trc = kmalloc( | 904 | vport->disc_trc = kmzlloc( |
905 | (sizeof(struct lpfc_debugfs_trc) * lpfc_debugfs_max_disc_trc), | 905 | (sizeof(struct lpfc_debugfs_trc) * lpfc_debugfs_max_disc_trc), |
906 | GFP_KERNEL); | 906 | GFP_KERNEL); |
907 | 907 | ||
@@ -912,8 +912,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
912 | goto debug_failed; | 912 | goto debug_failed; |
913 | } | 913 | } |
914 | atomic_set(&vport->disc_trc_cnt, 0); | 914 | atomic_set(&vport->disc_trc_cnt, 0); |
915 | memset(vport->disc_trc, 0, | ||
916 | (sizeof(struct lpfc_debugfs_trc) * lpfc_debugfs_max_disc_trc)); | ||
917 | 915 | ||
918 | snprintf(name, sizeof(name), "discovery_trace"); | 916 | snprintf(name, sizeof(name), "discovery_trace"); |
919 | vport->debug_disc_trc = | 917 | vport->debug_disc_trc = |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 42e20612df80..ecebdfa00470 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1265,11 +1265,10 @@ lpfc_hba_init(struct lpfc_hba *phba, uint32_t *hbainit) | |||
1265 | uint32_t *HashWorking; | 1265 | uint32_t *HashWorking; |
1266 | uint32_t *pwwnn = (uint32_t *) phba->wwnn; | 1266 | uint32_t *pwwnn = (uint32_t *) phba->wwnn; |
1267 | 1267 | ||
1268 | HashWorking = kmalloc(80 * sizeof(uint32_t), GFP_KERNEL); | 1268 | HashWorking = kcalloc(80, sizeof(uint32_t), GFP_KERNEL); |
1269 | if (!HashWorking) | 1269 | if (!HashWorking) |
1270 | return; | 1270 | return; |
1271 | 1271 | ||
1272 | memset(HashWorking, 0, (80 * sizeof(uint32_t))); | ||
1273 | HashWorking[0] = HashWorking[78] = *pwwnn++; | 1272 | HashWorking[0] = HashWorking[78] = *pwwnn++; |
1274 | HashWorking[1] = HashWorking[79] = *pwwnn; | 1273 | HashWorking[1] = HashWorking[79] = *pwwnn; |
1275 | 1274 | ||
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 17d7dc05149b..cd674938ccd5 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -202,10 +202,9 @@ lpfc_new_scsi_buf(struct lpfc_vport *vport) | |||
202 | dma_addr_t pdma_phys; | 202 | dma_addr_t pdma_phys; |
203 | uint16_t iotag; | 203 | uint16_t iotag; |
204 | 204 | ||
205 | psb = kmalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL); | 205 | psb = kzalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL); |
206 | if (!psb) | 206 | if (!psb) |
207 | return NULL; | 207 | return NULL; |
208 | memset(psb, 0, sizeof (struct lpfc_scsi_buf)); | ||
209 | 208 | ||
210 | /* | 209 | /* |
211 | * Get memory from the pci pool to map the virt space to pci bus space | 210 | * Get memory from the pci pool to map the virt space to pci bus space |