xtensa: simplify trap_init

Drop redundant 'fast &&' condition from the exception handler assignment
loop.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
Max Filippov 2019-01-02 02:19:30 -08:00
parent 7256864530
commit 60deebe614
1 changed files with 2 additions and 3 deletions

View File

@ -420,16 +420,15 @@ void __init trap_init(void)
/* Setup specific handlers. */ /* Setup specific handlers. */
for(i = 0; dispatch_init_table[i].cause >= 0; i++) { for(i = 0; dispatch_init_table[i].cause >= 0; i++) {
int fast = dispatch_init_table[i].fast; int fast = dispatch_init_table[i].fast;
int cause = dispatch_init_table[i].cause; int cause = dispatch_init_table[i].cause;
void *handler = dispatch_init_table[i].handler; void *handler = dispatch_init_table[i].handler;
if (fast == 0) if (fast == 0)
set_handler(default_handler, cause, handler); set_handler(default_handler, cause, handler);
if (fast && fast & USER) if ((fast & USER) != 0)
set_handler(fast_user_handler, cause, handler); set_handler(fast_user_handler, cause, handler);
if (fast && fast & KRNL) if ((fast & KRNL) != 0)
set_handler(fast_kernel_handler, cause, handler); set_handler(fast_kernel_handler, cause, handler);
} }