linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Subject: [PATCH] lpfc : lpfc_debugfs.c kmalloc + memset conversion to kzalloc
Date: Fri, 3 Aug 2007 16:14:56 +0000 (UTC)
Date: Sun, 05 Aug 2007 06:00:17 -0400	[thread overview]
Message-ID: <1186308017.2983.9.camel@localhost.localdomain> (raw)
In-Reply-To: <46B34CA6.6010502@emulex.com>

One more area, introduced by the lpfc 8.2.2 patches, that need the 
  kmalloc+memset conversion.

This patch to be applied atop the 8.2.2 patches.

-- james s


Signed-off-by: James Smart <James.Smart@emulex.com>


diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index 2e3c01b..ef99e2b 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -856,9 +856,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
 			goto debug_failed;
 		}
 		if (!phba->slow_ring_trc) {
-			phba->slow_ring_trc = kmalloc(
-				(sizeof(struct lpfc_debugfs_trc) *
-				lpfc_debugfs_max_slow_ring_trc),
+			phba->slow_ring_trc = kcalloc(
+				lpfc_debugfs_max_slow_ring_trc,
+				sizeof(struct lpfc_debugfs_trc),
 				GFP_KERNEL);
 			if (!phba->slow_ring_trc) {
 				lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -867,9 +867,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
 				goto debug_failed;
 			}
 			atomic_set(&phba->slow_ring_trc_cnt, 0);
-			memset(phba->slow_ring_trc, 0,
-				(sizeof(struct lpfc_debugfs_trc) *
-				lpfc_debugfs_max_slow_ring_trc));
 		}
 	}
 



  reply	other threads:[~2007-08-03 16:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200707311845.48807.m.kozlowski@tuxland.pl>
2007-07-31 16:50 ` [PATCH 01] kmalloc + memset conversion co kzalloc Mariusz Kozlowski
2007-07-31 16:52 ` [PATCH 02] kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-07-31 17:01 ` [PATCH 06] drivers/scsi/bvme6000_scsi.c: " Mariusz Kozlowski
2007-07-31 17:35 ` [PATCH 21] drivers/scsi/dpt_i2o.c: " Mariusz Kozlowski
2007-07-31 17:45   ` Salyzyn, Mark
2007-07-31 17:46 ` [PATCH 26] drivers/scsi/gdth.c: " Mariusz Kozlowski
2007-07-31 18:01 ` [PATCH 31] drivers/scsi/ide-scsi.c: " Mariusz Kozlowski
2007-08-01 21:02   ` Bartlomiej Zolnierkiewicz
2007-07-31 18:25 ` [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-08-03 15:42   ` James Smart
2007-07-31 18:26 ` [PATCH 45] drivers/scsi/lpfc/lpfc_init.c: " Mariusz Kozlowski
2007-08-03 15:41   ` James Smart
2007-07-31 18:27 ` [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-08-03 15:41   ` James Smart
2007-08-03 16:14     ` James Smart [this message]
2007-08-03 16:14     ` [PATCH] lpfc : lpfc_debugfs.c " James Smart
2007-08-03 16:15     ` James Smart
2007-07-31 18:34 ` [PATCH 47] drivers/scsi/megaraid.c: " Mariusz Kozlowski
2007-07-31 18:54 ` [PATCH 50] drivers/message/fusion/mptctl.c: mostly " Mariusz Kozlowski
2007-07-31 21:23 ` [PATCH 54] drivers/scsi/mvme16x_scsi.c: " Mariusz Kozlowski
2007-07-31 21:29 ` [PATCH 56] drivers/scsi/NCR_D700.c: " Mariusz Kozlowski
2007-07-31 21:37 ` [PATCH 61] drivers/scsi/osst.c: " Mariusz Kozlowski
2007-07-31 21:46 ` [PATCH 63] drivers/scsi/pluto.c: mostly kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-07-31 21:51 ` [PATCH 64] drivers/scsi/qla2xxx/qla_init.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-07-31 22:00   ` Andrew Vasquez
2007-07-31 22:21 ` [PATCH 82] drivers/scsi/zorro7xx.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-08-01 16:11   ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1186308017.2983.9.camel@localhost.localdomain \
    --to=james.smart@emulex.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=m.kozlowski@tuxland.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).