linux/arch/powerpc
Julia Lawall 43caa61f15 powerpc/pseries/dlpar: Use kasprintf
kasprintf combines kmalloc and sprintf, and takes care of the size
calculation itself.

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

// <smpl>
@@
expression a,flag;
expression list args;
statement S;
@@

  a =
-  \(kmalloc\|kzalloc\)(...,flag)
+  kasprintf(flag,args)
  <... when != a
  if (a == NULL || ...) S
  ...>
- sprintf(a,args);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-04-07 18:00:42 +10:00
..
boot powerpc: Add a new zImage for maple using a different link address 2010-04-07 14:12:36 +10:00
configs powerpc/52xx: update defconfigs 2010-03-10 14:39:50 -07:00
include/asm powerpc/ppc32: Fixup pmd_page to work when ARCH_PFN_OFFSET is non-zero 2010-04-07 18:00:30 +10:00
kernel powerpc/8xx: Use SPRG2 and DAR registers to stash r11 and cr. 2010-04-07 18:00:34 +10:00
kvm include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
lib powerpc: Fix handling of strncmp with zero len 2010-04-07 18:00:39 +10:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm powerpc: Disable interrupts for data breakpoint exceptions 2010-04-07 14:44:38 +10:00
oprofile include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
platforms powerpc/pseries/dlpar: Use kasprintf 2010-04-07 18:00:42 +10:00
sysdev include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xmon powerpc: Mark some variables in the page fault path __read_mostly 2010-02-03 17:39:48 +11:00
Kconfig powerpc: Remove IOMMU_VMERGE config option 2010-03-19 16:38:16 +11:00
Kconfig.debug Merge branch 'next' of git://git.secretlab.ca/git/linux-2.6 2009-12-16 13:26:53 -08:00
Makefile powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00
relocs_check.pl powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00