All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [Patch] kmemdup() cleanup in drivers/acpi/
@ 2006-10-23 20:14 Eric Sesterhenn
  2006-10-23 20:15 ` [KJ] [Patch] kmemdup() cleanup in drivers/base Eric Sesterhenn
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Eric Sesterhenn @ 2006-10-23 20:14 UTC (permalink / raw)
  To: kernel-janitors

hi,

replace open coded kmemdup() to save some screen space,
and allow inlining/not inlining to be triggered by gcc.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.19-rc2-git7/drivers/acpi/scan.c.orig	2006-10-23 20:57:29.000000000 +0200
+++ linux-2.6.19-rc2-git7/drivers/acpi/scan.c	2006-10-23 20:59:03.000000000 +0200
@@ -853,10 +853,8 @@ static void acpi_device_set_id(struct ac
 		device->flags.unique_id = 1;
 	}
 	if (cid_list) {
-		device->pnp.cid_list = kmalloc(cid_list->size, GFP_KERNEL);
-		if (device->pnp.cid_list)
-			memcpy(device->pnp.cid_list, cid_list, cid_list->size);
-		else
+		device->pnp.cid_list = kmemdup(cid_list, cid_list->size, GFP_KERNEL);
+		if (!device->pnp.cid_list)
 			printk(KERN_ERR "Memory allocation error\n");
 	}
 


_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2006-11-06  8:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-23 20:14 [KJ] [Patch] kmemdup() cleanup in drivers/acpi/ Eric Sesterhenn
2006-10-23 20:15 ` [KJ] [Patch] kmemdup() cleanup in drivers/base Eric Sesterhenn
2006-10-23 20:16 ` [KJ] [Patch] kmemdup() cleanup in drivers/ieee1394 Eric Sesterhenn
2006-10-23 20:17 ` [KJ] [Patch] kmemdup() cleanup in drivers/infiniband Eric Sesterhenn
2006-10-23 20:18 ` [KJ] [Patch] kmemdup() cleanup in drivers/media/video Eric Sesterhenn
2006-10-23 20:19 ` [KJ] [Patch] kmemdup() cleanup in drivers/message Eric Sesterhenn
2006-10-23 20:20 ` [KJ] [Patch] kmemdup() cleanup in drivers/net Eric Sesterhenn
2006-10-23 20:21 ` [KJ] [Patch] kmemdup() cleanup in drivers/parport Eric Sesterhenn
2006-10-23 20:22 ` [KJ] [Patch] kmemdup() cleanup in drivers/pci/ Eric Sesterhenn
2006-10-23 20:42 ` [KJ] [Patch] kmemdup() cleanup in drivers/message Matthew Wilcox
2006-10-24  3:05 ` [KJ] [Patch] kmemdup() cleanup in drivers/infiniband Roland Dreier
2006-10-24  8:26 ` [KJ] [Patch] kmemdup() cleanup in drivers/pci/ Alexey Dobriyan
2006-10-24 14:53 ` Eric Sesterhenn / Snakebyte
2006-10-24 16:36 ` walter harms
2006-10-24 17:51 ` Alexey Dobriyan
2006-10-24 18:09 ` Matthew Wilcox
2006-10-26 19:04 ` [KJ] [Patch] kmemdup() cleanup in drivers/scsi Eric Sesterhenn
2006-10-26 19:07 ` [KJ] [Patch] kmemdup() cleanup in drivers/video/ Eric Sesterhenn
2006-10-29 19:00 ` [KJ] [Patch] kmemdup() cleanup in drivers/media/video Alexey Dobriyan
2006-10-29 19:02 ` [KJ] [Patch] kmemdup() cleanup in drivers/message Alexey Dobriyan
2006-11-06  8:13 ` [KJ] [Patch] kmemdup() cleanup in drivers/net Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.