From: Coly Li <bosong.ly@taobao.com>
To: linux-kernel@vger.kernel.org
Cc: Coly Li <bosong.ly@taobao.com>, Greg KH <gregkh@suse.de>,
Yong Zhang <yong.zhang0@gmail.com>,
Wang Cong <xiyou.wangcong@gmail.com>
Subject: [PATCH 0/4] use BUG_ON correctly, v4
Date: Sun, 27 Mar 2011 01:26:51 +0800 [thread overview]
Message-ID: <1301160415-24569-1-git-send-email-bosong.ly@taobao.com> (raw)
Most of BUG_ON() implementations use unlikely() internally for better
branch prediction results. The following method to use BUG_ON() with
an explicit unlikely() doesn't make things better and is unwelcome:
BUG_ON(unlikely(condition));
Source code should use BUG_ON() just with condition code.
For arch implementation of BUG_ON(), there are feed backs for v2 patch
set from MIPS and PowerPC developers than neither explicit no implicit
unlikely() does help anything.
Therefore using unlikely() explicit with BUG_ON() is always a bug. This
patch set removes all incorrect BUG_ON() usage.
Patch "Staging: wl_cfg80211.c: use BUG_ON correctly" is merged into
upstream (commit d7ddd169), no longer in v4 patch set. For v4
patch set, proper maintainers are added into Cc list by the help of
scripts/get_maintainer.pl.
Cc: Greg KH <gregkh@suse.de>
Cc: Yong Zhang <yong.zhang0@gmail.com>
Cc: Wang Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Coly Li <bosong.ly@taobao.com>
---
drivers/dma/iop-adma.c | 6 +++---
drivers/dma/mv_xor.c | 6 +++---
drivers/dma/ppc4xx/adma.c | 8 ++++----
drivers/scsi/scsi_lib.c | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
next reply other threads:[~2011-03-26 17:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-26 17:26 Coly Li [this message]
2011-03-26 17:26 ` [PATCH 1/4] dma: use BUG_ON correctly in iop-adma.c, v4 Coly Li
2011-03-26 17:26 ` [PATCH 2/4] dma: use BUG_ON correctly in mv_xor.c, v4 Coly Li
2011-03-26 17:26 ` [PATCH 3/4] dma: use BUG_ON correctly in ppc4xx/adam.c, v4 Coly Li
2011-03-26 17:26 ` [PATCH 4/4] scsi_lib.c: use BUG_ON correctly, v4 Coly Li
2011-03-31 5:44 ` [PATCH 0/4] " Koul, Vinod
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=1301160415-24569-1-git-send-email-bosong.ly@taobao.com \
--to=bosong.ly@taobao.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
--cc=yong.zhang0@gmail.com \
/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
all inboxes | Powered by JetHome®