kernel-hacking-2024-linux-s.../arch/powerpc
Julia Lawall 7405217317 powerpc/pseries: Use kstrdup
Use kstrdup when the goal of an allocation is copy a string into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to;
expression flag,E1,E2;
statement S;
@@

-  to = kmalloc(strlen(from) + 1,flag);
+  to = kstrdup(from, flag);
   ... when != \(from = E1 \| to = E1 \)
   if (to==NULL || ...) S
   ... when != \(from = E2 \| to = E2 \)
-  strcpy(to, from);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-07-09 11:28:37 +10:00
..
boot Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6 2010-06-27 07:30:25 -07:00
configs powerpc: Disable CONFIG_SYSFS_DEPRECATED 2010-06-15 15:02:33 +10:00
include/asm powerpc/numa: Use form 1 affinity to setup node distance 2010-07-09 11:28:35 +10:00
kernel powerpc: Add i8042 keyboard and mouse irq parsing 2010-07-09 11:28:33 +10:00
kvm KVM: powerpc: fix init/exit annotation 2010-06-09 18:39:09 +03:00
lib Merge commit 'paulus-perf/master' into next 2010-07-09 11:25:48 +10:00
math-emu
mm powerpc/numa: Use form 1 affinity to setup node distance 2010-07-09 11:28:35 +10:00
oprofile powerpc/oprofile: fix potential buffer overrun in op_model_cell.c 2010-06-07 11:18:56 +02:00
platforms powerpc/pseries: Use kstrdup 2010-07-09 11:28:37 +10:00
sysdev powerpc/mpic: Add ability to reset a core via MPIC 2010-07-09 11:28:27 +10:00
xmon
Kconfig powerpc/pseries: Partition hibernation support 2010-07-09 11:26:17 +10:00
Kconfig.debug powerpc: Unconditionally enabled irq stacks 2010-06-15 15:02:37 +10:00
Makefile powerpc: Fix module building for gcc 4.5 and 64 bit 2010-07-08 18:11:38 +10:00
relocs_check.pl