@@ -3031,7 +3031,7 @@ lpfc_debugfs_hdwqstat_open(struct inode *inode, struct file *file)
goto out;
/* Round to page boundary */
- debug->buffer = kcalloc(1, LPFC_SCSISTAT_SIZE, GFP_KERNEL);
+ debug->buffer = kzalloc(LPFC_SCSISTAT_SIZE, GFP_KERNEL);
if (!debug->buffer) {
kfree(debug);
goto out;
@@ -521,7 +521,7 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
chip = &mvs_chips[ent->driver_data];
SHOST_TO_SAS_HA(shost) =
- kcalloc(1, sizeof(struct sas_ha_struct), GFP_KERNEL);
+ kzalloc(sizeof(struct sas_ha_struct), GFP_KERNEL);
if (!SHOST_TO_SAS_HA(shost)) {
scsi_host_put(shost);
rc = -ENOMEM;
@@ -2757,7 +2757,7 @@ static int qedf_prepare_sb(struct qedf_ctx *qedf)
for (id = 0; id < qedf->num_queues; id++) {
fp = &(qedf->fp_array[id]);
fp->sb_id = QEDF_SB_ID_NULL;
- fp->sb_info = kcalloc(1, sizeof(*fp->sb_info), GFP_KERNEL);
+ fp->sb_info = kzalloc(sizeof(*fp->sb_info), GFP_KERNEL);
if (!fp->sb_info) {
QEDF_ERR(&(qedf->dbg_ctx), "SB info struct "
"allocation failed.\n");
Use kzalloc(...) rather than kcalloc(1, ...) because the number of elements we are specifying in this case is 1, so kzalloc would accomplish the same thing and we can simplify. Signed-off-by: Kenneth Lee <klee33@uw.edu> --- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/mvsas/mv_init.c | 2 +- drivers/scsi/qedf/qedf_main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)