x86/traps: Introduce fill_trap_info(), simplify DO_ERROR_INFO()
authorOleg Nesterov <oleg@redhat.com>
Wed, 7 May 2014 15:59:39 +0000 (17:59 +0200)
committerOleg Nesterov <oleg@redhat.com>
Wed, 14 May 2014 11:57:27 +0000 (13:57 +0200)
Extract the fill-siginfo code from DO_ERROR_INFO() into the new helper,
fill_trap_info().

It can calculate si_code and si_addr looking at trapnr, so we can remove
these arguments from DO_ERROR_INFO() and simplify the source code. The
generated code is the same, __builtin_constant_p(trapnr) == T.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
arch/x86/kernel/traps.c

Simple merge