Re: Patch: linux-2.5.30/arch/arm/mach-iop310/iq80310-pci.c BUG_ON(cond1 || cond2) separation

From: Russell King (rmk@arm.linux.org.uk)
Date: Mon Aug 05 2002 - 17:02:41 EST


On Mon, Aug 05, 2002 at 01:17:40PM -0700, Adam J. Richter wrote:
> I want to replace all statements in the kernel of the form
> BUG_ON(condition1 || condition2) with:
>
> BUG_ON(condition1);
> BUG_ON(condition2);

Why? In the case below, its one logical error (value out of range).
The register dump tells you more information. In fact, I don't care
which side of less than 1 or greater than 4 pin actually is. It's
indicating a bug in the PCI subsystem either way, and the analysis
is the same in either case.

> I was recently bitten by a very sporadic BUG_ON(cond1 || cond2)
> statement and was quite annoyed at the greatly reduced opportunity to
> debug the problem. Make these changes and someone who experiences
> the problem may be able to provide slightly more useful information.

This would make sense of the two conditions were unrelated to each
other.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:29 EST