[lkml]   [2011]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/4] use BUG_ON correctly, v4
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:
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

Cc: Greg KH <>
Cc: Yong Zhang <>
Cc: Wang Cong <>
Signed-off-by: Coly Li <>
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(-)

 \ /
  Last update: 2011-03-26 18:11    [W:0.054 / U:1.172 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site