linux/arch/s390/kernel
Julia Lawall acfa922c5a [S390] s390: Remove redundant test
The loop above the modified code only terminates when rc is a valid pointer.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:17 +01:00
..
vdso32 [S390] introduce vdso on s390 2008-12-25 13:38:55 +01:00
vdso64 [S390] introduce vdso on s390 2008-12-25 13:38:55 +01:00
asm-offsets.c [S390] introduce vdso on s390 2008-12-25 13:38:55 +01:00
audit.c
audit.h
base.S
bitmap.S
compat_audit.c
compat_exec_domain.c
compat_linux.c compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
compat_linux.h compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
compat_ptrace.h [S390] CVE-2008-1514: prevent ptrace padding area read/write in 31-bit mode 2008-09-09 12:39:06 +02:00
compat_signal.c [S390] fix system call parameter functions. 2008-11-27 11:06:56 +01:00
compat_wrapper.S compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
cpcmd.c
crash.c
debug.c [S390] s390: Remove redundant test 2008-12-25 13:39:17 +01:00
diag.c
dis.c
early.c [S390] Remove P390 support. 2008-07-14 10:02:25 +02:00
ebcdic.c
entry64.S [S390] Remove config options. 2008-12-25 13:39:15 +01:00
entry.h
entry.S [S390] Remove config options. 2008-12-25 13:39:15 +01:00
head31.S [S390] Remove initial kernel stack backchain initialization. 2008-12-25 13:39:13 +01:00
head64.S [S390] Remove initial kernel stack backchain initialization. 2008-12-25 13:39:13 +01:00
head.S [S390] Add processor type march=z10 and a processor type safety check. 2008-12-25 13:39:12 +01:00
init_task.c [S390] Fix alignment of initial kernel stack. 2008-11-27 11:06:58 +01:00
ipl.c [S390] ipl: Reboot from alternate device does not work when booting from file 2008-08-01 16:39:30 +02:00
irq.c
kprobes.c stop_machine: Wean existing callers off stop_machine_run() 2008-07-28 12:16:31 +10:00
machine_kexec.c [S390] Cleanup kprobes printk messages. 2008-07-14 10:02:24 +02:00
Makefile [S390] Remove config options. 2008-12-25 13:39:15 +01:00
mcount.S [S390] ftrace: function tracer backend for s390 2008-12-25 13:39:03 +01:00
mem_detect.c [S390] Remove diag 0x260 call from memory detection. 2008-08-01 16:39:34 +02:00
module.c
process.c [S390] ftrace: disable tracing on idle psw 2008-11-14 18:18:53 +01:00
ptrace.c [S390] remove ptrace warning on 31 bit. 2008-12-25 13:39:05 +01:00
reipl64.S
reipl.S
relocate_kernel64.S
relocate_kernel.S
s390_ext.c
s390_ksyms.c [S390] ftrace: function tracer backend for s390 2008-12-25 13:39:03 +01:00
setup.c [S390] s390/setup: set default preferred console device "ttyS" 2008-12-25 13:39:17 +01:00
signal.c [S390] fix system call parameter functions. 2008-11-27 11:06:56 +01:00
smp.c [S390] panic_stack leak in smp_alloc_lowcore 2008-12-25 13:39:16 +01:00
stacktrace.c [S390] Fix stacktrace compile bug. 2008-07-17 17:22:09 +02:00
sys_s390.c [S390] fix s390x_newuname 2008-11-14 18:18:55 +01:00
syscalls.S compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
time.c [S390] Remove config options. 2008-12-25 13:39:15 +01:00
topology.c [S390] cpu topology: remove dead code 2008-12-25 13:39:15 +01:00
traps.c
vdso.c [S390] introduce vdso on s390 2008-12-25 13:38:55 +01:00
vmlinux.lds.S [S390] Fix alignment of initial kernel stack. 2008-11-27 11:06:58 +01:00
vtime.c [S390] Remove config options. 2008-12-25 13:39:15 +01:00