linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: mporter@mvista.com
Cc: rmk@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Patch: linux-2.5.30/arch/arm/mach-iop310/iq80310-pci.c BUG_ON(cond1 || cond2) separation
Date: Mon, 5 Aug 2002 13:17:40 -0700	[thread overview]
Message-ID: <20020805131740.A2433@baldur.yggdrasil.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

	I want to replace all statements in the kernel of the form
BUG_ON(condition1 || condition2) with:

			BUG_ON(condition1);
			BUG_ON(condition2);

	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.

	There are only three other places in the kernel besides the
bug I tripped (Matt Dharm and Greg Kroah-Hartmann have already accepted
the patch that I submitted for that one, in drivers/usb/storage).  They
are:

	2 in arch/arm/mach-iop310/iq80310-pci.c
	12 in fs/ntfs/
	23 in fs/partitions/ldm.c

	Here is the patch for linux-2.5.30/arch/arm/mach-iop310/iq80310-pci.c.

	Please let me know if you are going to shepherd this patch to
Linus's linux-2.5 tree, if you want me to submit it to Linus or
someone else, or if there is some other way you'd like me to proceed.

	Thanks for your work on Linux on ARM.

-- 
Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

[-- Attachment #2: arm.diff --]
[-- Type: text/plain, Size: 535 bytes --]

--- linux-2.5.30/arch/arm/mach-iop310/iq80310-pci.c	2002-08-01 14:16:18.000000000 -0700
+++ linux/arch/arm/mach-iop310/iq80310-pci.c	2002-08-05 12:44:20.000000000 -0700
@@ -65,7 +65,8 @@
 {
 	irq_table *pci_irq_table;
 
-	BUG_ON(pin < 1 || pin > 4);
+	BUG_ON(pin < 1);
+	BUG_ON(pin > 4);
 
 	if (!system_rev) {
 		pci_irq_table = pci_pri_d_irq_table;
@@ -102,7 +103,8 @@
 {
 	irq_table *pci_irq_table;
 
-	BUG_ON(pin < 1 || pin > 4);
+	BUG_ON(pin < 1);
+	BUG_ON(pin > 4);
 
 	if (!system_rev) {
 		pci_irq_table = pci_sec_d_irq_table;

             reply	other threads:[~2002-08-05 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05 20:17 Adam J. Richter [this message]
2001-11-01 23:48 ` Patch: linux-2.5.30/arch/arm/mach-iop310/iq80310-pci.c BUG_ON(cond1 || cond2) separation Pavel Machek
2002-08-07 22:06   ` Russell King
2002-08-05 22:02 ` Russell King
2002-08-06  1:25 Adam J. Richter
2002-08-08  5:53 Adam J. Richter

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=20020805131740.A2433@baldur.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mporter@mvista.com \
    --cc=rmk@arm.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;
as well as URLs for NNTP newsgroup(s).