mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kcalloc: Re-order the first two out-of-order args to kcalloc().
@ 2006-12-08 23:41 Robert P. J. Day
  2006-12-09 13:53 ` Pekka Enberg
  0 siblings, 1 reply; 12+ messages in thread
From: Robert P. J. Day @ 2006-12-08 23:41 UTC (permalink / raw)
  To: Linux kernel mailing list


  Some calls to kcalloc() appear to have the first two args in the
wrong order.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

 drivers/macintosh/smu.c             |    2 +-
 drivers/net/skge.c                  |    2 +-
 drivers/scsi/sym53c8xx_2/sym_hipd.c |    2 +-
 drivers/usb/misc/uss720.c           |    2 +-
 net/sunrpc/svc.c                    |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 6dde27a..8c36894 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -945,7 +945,7 @@ static struct smu_sdbp_header *smu_creat
 	 */
 	tlen = sizeof(struct property) + len + 18;

-	prop = kcalloc(tlen, 1, GFP_KERNEL);
+	prop = kcalloc(1, tlen, GFP_KERNEL);
 	if (prop == NULL)
 		return NULL;
 	hdr = (struct smu_sdbp_header *)(prop + 1);
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index b60f045..8a39376 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -749,7 +749,7 @@ static int skge_ring_alloc(struct skge_r
 	struct skge_element *e;
 	int i;

-	ring->start = kcalloc(sizeof(*e), ring->count, GFP_KERNEL);
+	ring->start = kcalloc(ring->count, sizeof(*e), GFP_KERNEL);
 	if (!ring->start)
 		return -ENOMEM;

diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 940fa1e..21cd4c7 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -5545,7 +5545,7 @@ int sym_hcb_attach(struct Scsi_Host *sho
 	/*
 	 *  Allocate the array of lists of CCBs hashed by DSA.
 	 */
-	np->ccbh = kcalloc(sizeof(struct sym_ccb **), CCB_HASH_SIZE, GFP_KERNEL);
+	np->ccbh = kcalloc(CCB_HASH_SIZE, sizeof(struct sym_ccb **), GFP_KERNEL);
 	if (!np->ccbh)
 		goto attach_failed;

diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
index 7e8a0ac..0df16f9 100644
--- a/drivers/usb/misc/uss720.c
+++ b/drivers/usb/misc/uss720.c
@@ -705,7 +705,7 @@ static int uss720_probe(struct usb_inter
 	/*
 	 * Allocate parport interface
 	 */
-	if (!(priv = kcalloc(sizeof(struct parport_uss720_private), 1, GFP_KERNEL))) {
+	if (!(priv = kcalloc(1, sizeof(struct parport_uss720_private), GFP_KERNEL))) {
 		usb_put_dev(usbdev);
 		return -ENOMEM;
 	}
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index eb44ec9..1ae79a8 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -308,7 +308,7 @@ __svc_create(struct svc_program *prog, u

 	serv->sv_nrpools = npools;
 	serv->sv_pools =
-		kcalloc(sizeof(struct svc_pool), serv->sv_nrpools,
+		kcalloc(serv->sv_nrpools, sizeof(struct svc_pool),
 			GFP_KERNEL);
 	if (!serv->sv_pools) {
 		kfree(serv);

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

end of thread, other threads:[~2006-12-09 21:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-08 23:41 [PATCH] kcalloc: Re-order the first two out-of-order args to kcalloc() Robert P. J. Day
2006-12-09 13:53 ` Pekka Enberg
2006-12-09 13:54   ` Pekka Enberg
2006-12-09 14:03     ` Robert P. J. Day
2006-12-09 14:18       ` Pekka Enberg
2006-12-09 21:55         ` Stefan Richter
2006-12-09 14:00   ` Robert P. J. Day
2006-12-09 14:13     ` Pekka Enberg
2006-12-09 14:17       ` Robert P. J. Day
2006-12-09 14:31         ` Pekka Enberg
2006-12-09 14:35           ` Robert P. J. Day
2006-12-09 21:57         ` Stefan Richter

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®