aha/arch/m68k
Julia Lawall 93026e217b arch/m68k/mm/sun3mmu.c: Eliminate NULL test and memset after alloc_bootmem
As noted by Akinobu Mita in patch b1fceac2b9,
alloc_bootmem and related functions never return NULL and always return a
zeroed region of memory.  Thus a NULL test or memset after calls to these
functions is unnecessary.

This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E;
statement S;
@@

E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
.. when != E
(
- BUG_ON (E == NULL);
|
- if (E == NULL) S
)

@@
expression E,E1;
@@

E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
.. when != E
- memset(E,0,E1);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:40 -07:00
..
amiga m68k/amiga/: possible cleanups 2008-07-20 17:24:39 -07:00
apollo m68k: missing __init 2007-07-20 08:24:49 -07:00
atari m68k/atari/debug.c: possible cleanups 2008-07-20 17:24:39 -07:00
bvme6000 bvme6000-rtc: BKL pushdown 2008-06-20 14:05:55 -06:00
configs m68k: enable CONFIG_COMPAT_BRK by default 2008-06-06 11:29:09 -07:00
fpsp040 Stringify support commas 2008-07-20 17:24:38 -07:00
hp300 m68k: kill arch/m68k/hp300/ksyms.c 2008-02-05 09:44:23 -08:00
ifpsp060 Stringify support commas 2008-07-20 17:24:38 -07:00
kernel m68k/apollo: Add missing call to apollo_parse_bootinfo() 2008-07-20 17:24:40 -07:00
lib Stringify support commas 2008-07-20 17:24:38 -07:00
mac m68k/mac/: possible cleanups 2008-07-20 17:24:39 -07:00
math-emu Stringify support commas 2008-07-20 17:24:38 -07:00
mm arch/m68k/mm/sun3mmu.c: Eliminate NULL test and memset after alloc_bootmem 2008-07-20 17:24:40 -07:00
mvme16x mvme16x-rtc: BKL pushdown 2008-07-02 15:06:23 -06:00
mvme147 m68k: missing __init 2007-07-20 08:24:49 -07:00
q40 m68k/q40/config.c: make functions static 2008-07-20 17:24:39 -07:00
sun3 m68k/sun3/: possible cleanups 2008-07-20 17:24:39 -07:00
sun3x m68k: missing __init 2007-07-20 08:24:49 -07:00
tools/amiga Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
Kconfig m68k/Atari: remove the dead ATARI_SCC{,_DMA} options 2008-07-20 17:24:40 -07:00
Kconfig.debug Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile m68k: make multi_defconfig the default defconfig 2008-07-20 17:24:38 -07:00