public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating only one thing
@ 2009-12-19  7:17 Julia Lawall
  2009-12-19 14:08 ` [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating onlyone thing jack_wang
  2009-12-19 14:08 ` jack_wang
  0 siblings, 2 replies; 3+ messages in thread
From: Julia Lawall @ 2009-12-19  7:17 UTC (permalink / raw)
  To: jack_wang, lindar_liu, 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/pm8001/pm8001_init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
--- a/drivers/scsi/pm8001/pm8001_init.c 2009-12-12 00:23:19.000000000 +0100
+++ b/drivers/scsi/pm8001/pm8001_init.c 2009-12-19 07:52:44.000000000 +0100
@@ -654,7 +654,7 @@ static int __devinit pm8001_pci_probe(st
 	}
 	chip = &pm8001_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)) {
 		rc = -ENOMEM;
 		goto err_out_free_host;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating onlyone thing
  2009-12-19  7:17 [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating only one thing Julia Lawall
@ 2009-12-19 14:08 ` jack_wang
  2009-12-19 14:08 ` jack_wang
  1 sibling, 0 replies; 3+ messages in thread
From: jack_wang @ 2009-12-19 14:08 UTC (permalink / raw)
  To: Julia Lawall, lindar_liu, James E.J. Bottomley, linux-scsi,
	linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1232 bytes --]

RE£º[PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating onlyone thing

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/pm8001/pm8001_init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
--- a/drivers/scsi/pm8001/pm8001_init.c 2009-12-12 00:23:19.000000000 +0100
+++ b/drivers/scsi/pm8001/pm8001_init.c 2009-12-19 07:52:44.000000000 +0100
@@ -654,7 +654,7 @@ static int __devinit pm8001_pci_probe(st
 	}
 	chip = &pm8001_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)) {
 		rc = -ENOMEM;
 		goto err_out_free_host;


[Jack]Acked-by:Jack Wang <jack_wang@usish.com>
Thanks, Julia
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating onlyone thing
  2009-12-19  7:17 [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating only one thing Julia Lawall
  2009-12-19 14:08 ` [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating onlyone thing jack_wang
@ 2009-12-19 14:08 ` jack_wang
  1 sibling, 0 replies; 3+ messages in thread
From: jack_wang @ 2009-12-19 14:08 UTC (permalink / raw)
  To: Julia Lawall, lindar_liu, James E.J. Bottomley, linux-scsi,
	linux-kernel, kernel-janitors

RE:[PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating onlyone thing

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/pm8001/pm8001_init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
--- a/drivers/scsi/pm8001/pm8001_init.c 2009-12-12 00:23:19.000000000 +0100
+++ b/drivers/scsi/pm8001/pm8001_init.c 2009-12-19 07:52:44.000000000 +0100
@@ -654,7 +654,7 @@ static int __devinit pm8001_pci_probe(st
 	}
 	chip = &pm8001_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)) {
 		rc = -ENOMEM;
 		goto err_out_free_host;


[Jack]Acked-by:Jack Wang <jack_wang@usish.com>
Thanks, Julia


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-19 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-19  7:17 [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating only one thing Julia Lawall
2009-12-19 14:08 ` [PATCH 5/7] drivers/scsi/pm8001: Use kzalloc for allocating onlyone thing jack_wang
2009-12-19 14:08 ` jack_wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox