From: roy.qing.li@gmail.com
To: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
fabf@skynet.be, jkosina@suse.cz, paulmck@linux.vnet.ibm.com,
richard@nod.at, oleg@redhat.com, akpm@linux-foundation.org
Subject: [RFC][PATCH] signal: replace !likely with unlikely!
Date: Thu, 11 Sep 2014 08:48:16 +0800 [thread overview]
Message-ID: <1410396496-13845-1-git-send-email-roy.qing.li@gmail.com> (raw)
From: Li RongQing <roy.qing.li@gmail.com>
!likely() is hard to be understood, and I do not know if compiler can
optimise this condition, but unlikely(!()) is clear
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
kernel/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 8f0876f..6156cfa 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1571,7 +1571,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
ret = -1;
- if (!likely(lock_task_sighand(t, &flags)))
+ if (unlikely(!lock_task_sighand(t, &flags)))
goto ret;
ret = 1; /* the signal is ignored */
--
1.7.10.4
next reply other threads:[~2014-09-11 0:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 0:48 roy.qing.li [this message]
2014-09-11 19:18 ` Guenter Roeck
2014-09-13 2:48 ` Li RongQing
2014-09-13 10:04 ` Richard Weinberger
2014-09-13 13:28 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410396496-13845-1-git-send-email-roy.qing.li@gmail.com \
--to=roy.qing.li@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=richard@nod.at \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome