xtensa: simplify trap_init
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 2 Jan 2019 10:19:30 +0000 (02:19 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 7 Feb 2019 20:35:32 +0000 (12:35 -0800)
Drop redundant 'fast &&' condition from the exception handler assignment
loop.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/kernel/traps.c

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