android_kernel_xiaomi_sdm845/arch/s390
Julia Lawall 402a3998ba [S390] arch/s390: 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/s390/kernel/topology.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: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-14 10:02:14 +02:00
..
appldata [S390] make appldata compile w/o CONFIG_SWAP 2008-07-14 10:02:00 +02:00
boot
crypto [CRYPTO] sha384: Hardware acceleration for s390 2008-04-21 10:19:21 +08:00
hypfs Kobject: convert arch/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:39 -08:00
kernel [S390] arch/s390: Eliminate NULL test and memset after alloc_bootmem 2008-07-14 10:02:14 +02:00
kvm KVM: s390: Fix race condition in kvm_s390_handle_wait 2008-06-06 21:08:26 +03:00
lib [S390] uaccess_mvcos: #ifdef config dependent code. 2008-04-30 13:38:46 +02:00
math-emu [S390] remove -traditional 2008-04-30 13:38:44 +02:00
mm Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-06-11 10:35:44 -07:00
oprofile Combine instrumentation menus in kernel/Kconfig.instrumentation 2007-10-19 11:53:54 -07:00
defconfig [S390] Update default configuration. 2008-05-30 10:03:36 +02:00
Kconfig [S390] cio: Add chsc subchannel driver. 2008-07-14 10:02:12 +02:00
Kconfig.debug [S390] DEBUG_PAGEALLOC support for s390. 2008-02-05 16:50:54 +01:00
Makefile KVM: s390: arch backend for the kvm kernel module 2008-04-27 12:00:42 +03:00