linux/arch/frv
Julia Lawall 70a3075d40 FRV: 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.

 arch/frv/mm/init.c |    2 --
 1 file changed, 2 deletions(-)

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: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 15:06:54 -07:00
..
boot FRV: Drop 'TOPDIR' from Makefiles 2008-01-28 23:14:37 +01:00
kernel sysctl: simplify ->strategy 2008-10-16 11:21:47 -07:00
lib move frv docs one level up 2008-02-03 15:54:28 +02:00
mb93090-mb00 FRV: Provide dma_map_page() for NOMMU and fix comments 2008-10-16 15:06:54 -07:00
mm FRV: Eliminate NULL test and memset after alloc_bootmem 2008-10-16 15:06:54 -07:00
Kconfig ide: introduce HAVE_IDE 2008-02-09 10:46:40 +01:00
Kconfig.debug [PATCH] frv: drop unsupported debugging features 2006-01-08 20:13:36 -08:00
Makefile kbuild: enable 'make AFLAGS=...' to add additional options to AS 2007-10-15 21:59:31 +02:00
defconfig [PATCH] FRV: Add defconfig 2005-07-07 18:23:42 -07:00