* [PATCH 4/7] drivers/scsi/mvsas: Use kzalloc for allocating only one thing
@ 2009-12-19 7:17 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2009-12-19 7:17 UTC (permalink / raw)
To: James E.J. Bottomley, linux-scsi, linux-kernel, kernel-janitors
From: Julia Lawall <julia@diku.dk>
Use kzalloc rather than kcalloc(1,...)
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
@@
- kcalloc(1,
+ kzalloc(
...)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
drivers/scsi/mvsas/mv_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -p a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
--- a/drivers/scsi/mvsas/mv_init.c 2009-12-12 00:23:19.000000000 +0100
+++ b/drivers/scsi/mvsas/mv_init.c 2009-12-19 07:52:38.000000000 +0100
@@ -541,7 +541,7 @@ static int __devinit mvs_pci_init(struct
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)) {
kfree(shost);
rc = -ENOMEM;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-19 7:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-19 7:17 [PATCH 4/7] drivers/scsi/mvsas: Use kzalloc for allocating only one thing Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®