Re: [PATCH 0/6] use BUG_ON correctly
From: Coly Li
Date: Thu Jan 27 2011 - 01:53:15 EST
On 2011å01æ27æ 14:20, Yong Zhang Wrote:
On Thu, Jan 27, 2011 at 2:38 PM, Coly Li<i@xxxxxxx> wrote:
On 2011å01æ27æ 14:07, Yong Zhang Wrote:
On Thu, Jan 27, 2011 at 2:21 PM, Coly Li<i@xxxxxxx> wrote:
On 2011å01æ27æ 10:02, Yong Zhang Wrote:
On Thu, Jan 27, 2011 at 2:39 AM, Coly Li<bosong.ly@xxxxxxxxxx> wrote:
BUG_ON() already uses unlikely() inside its definition if possible,
It's true for asm-generic/bug.h.
But for archs which has defined HAVE_ARCH_BUG,
unlikely() is not always included in it.
IMHO, if this condition happens, it should be a bug of the arch
implementation,
So that means we should fix that first :)
Could you please to identify a piece of kernel code which provides an
example as the condition you mentioned ?
So I can have a look firstly.
# line filename / context / line
1 35 arch/mips/include/asm/bug.h<<HAVE_ARCH_BUG_ON>>
#define HAVE_ARCH_BUG_ON
2 115 arch/powerpc/include/asm/bug.h<<HAVE_ARCH_BUG_ON>>
#define HAVE_ARCH_BUG_ON
I don't find arch dependent implementation of BUG_ON from the above files. Do I miss something ?
--
Coly Li
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/