linux-mips
[Top] [All Lists]

[PATCH 1/3] signal: avoid useless test in do_signal()

To: ralf@linux-mips.org
Subject: [PATCH 1/3] signal: avoid useless test in do_signal()
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
Date: Fri, 9 Feb 2007 16:07:36 +0100
Cc: linux-mips@linux-mips.org, anemo@mba.ocn.ne.jp, Franck Bui-Huu <fbuihuu@gmail.com>
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from; b=covEI7rV+DYBPHG6BzgSO4OzyckE74rFFd66JmckX09x2eeXYmX9rsZFtjEXGMCNOUgYLTwAteeQ/FmwrDYe/TisIbwuauBkZyewe6hO7Y7xPgBAzpuFlk9TdK1GVTGzAKrXJ/ZaM6ly/6W6e0j3h+Z9xRLag2ohvyxereM6mBQ=
In-reply-to: <1171033658561-git-send-email-fbuihuu@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1171033658561-git-send-email-fbuihuu@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Franck Bui-Huu <fbuihuu@gmail.com>

Indeed we can simply clear the flag whatever its value

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/signal.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 8dfb7b1..464d34b 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -552,10 +552,8 @@ void do_signal(struct pt_regs *regs)
                         * and will be restored by sigreturn, so we can simply
                         * clear the TIF_RESTORE_SIGMASK flag.
                         */
-                       if (test_thread_flag(TIF_RESTORE_SIGMASK))
-                               clear_thread_flag(TIF_RESTORE_SIGMASK);
+                       clear_thread_flag(TIF_RESTORE_SIGMASK);
                }
-
                return;
        }
 
-- 
1.4.4.3.ge6d4


<Prev in Thread] Current Thread [Next in Thread>