From: Stoyan Gaydarov <stoyboyker@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Stoyan Gaydarov <stoyboyker@gmail.com>
Subject: [PATCH 25/25] [drivers] BUG to BUG_ON changes
Date: Tue, 10 Mar 2009 00:10:50 -0500 [thread overview]
Message-ID: <1236661850-8237-26-git-send-email-stoyboyker@gmail.com> (raw)
In-Reply-To: <1236661850-8237-25-git-send-email-stoyboyker@gmail.com>
Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
---
drivers/ata/pata_hpt366.c | 3 +--
drivers/base/iommu.c | 4 +---
drivers/gpu/drm/i915/intel_fb.c | 6 ++----
drivers/mtd/ssfdc.c | 3 +--
drivers/sh/intc.c | 3 +--
5 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 65c28e5..8e0c9f6 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -234,8 +234,7 @@ static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev,
break;
clocks++;
}
- if (!clocks->xfer_mode)
- BUG();
+ BUG_ON(!clocks->xfer_mode);
/*
* Combine new mode bits with old config bits and disable
diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c
index 5e039d4..e564416 100644
--- a/drivers/base/iommu.c
+++ b/drivers/base/iommu.c
@@ -25,9 +25,7 @@ static struct iommu_ops *iommu_ops;
void register_iommu(struct iommu_ops *ops)
{
- if (iommu_ops)
- BUG();
-
+ BUG_ON(iommu_ops);
iommu_ops = ops;
}
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index b7f0ebe..201b65c 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -663,8 +663,7 @@ static int intelfb_multi_fb_probe_crtc(struct drm_device *dev, struct drm_crtc *
if (connector->encoder->crtc == modeset->crtc) {
modeset->connectors[conn_count] = connector;
conn_count++;
- if (conn_count > INTELFB_CONN_LIMIT)
- BUG();
+ BUG_ON(conn_count > INTELFB_CONN_LIMIT);
}
}
@@ -812,8 +811,7 @@ static int intelfb_single_fb_probe(struct drm_device *dev)
if(connector->encoder->crtc == modeset->crtc) {
modeset->connectors[conn_count++] = connector;
- if (conn_count > INTELFB_CONN_LIMIT)
- BUG();
+ BUG_ON(conn_count > INTELFB_CONN_LIMIT);
}
}
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c
index 3f67e00..5a1d8e2 100644
--- a/drivers/mtd/ssfdc.c
+++ b/drivers/mtd/ssfdc.c
@@ -393,8 +393,7 @@ static int ssfdcr_readsect(struct mtd_blktrans_dev *dev,
" block_addr=%d\n", logic_sect_no, sectors_per_block, offset,
block_address);
- if (block_address >= ssfdc->map_len)
- BUG();
+ BUG_ON(block_address >= ssfdc->map_len);
block_address = ssfdc->logic_block_map[block_address];
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c
index 58d24c5..a031989 100644
--- a/drivers/sh/intc.c
+++ b/drivers/sh/intc.c
@@ -458,8 +458,7 @@ static unsigned int __init intc_prio_data(struct intc_desc *desc,
} else {
fn = REG_FN_MODIFY_BASE;
mode = MODE_PRIO_REG;
- if (!pr->set_reg)
- BUG();
+ BUG_ON(!pr->set_reg);
reg_e = pr->set_reg;
reg_d = pr->set_reg;
}
--
1.6.1.3
next prev parent reply other threads:[~2009-03-10 5:20 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-10 5:10 [PATCH 00/25] BUG to BUG_ON changes Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 01/25] [btrfs] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 02/25] [staging] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 03/25] [net] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 04/25] [arm] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 05/25] [ia64] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 06/25] [mips] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 07/25] [x86] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 08/25] [sparc] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 09/25] [s390] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 10/25] [mn10300] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 11/25] [alpha] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 12/25] [frv] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 13/25] [blackfin] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 14/25] [mm] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 15/25] [cris] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 16/25] [m32r] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 17/25] [parisc] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 18/25] [xtensa] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 19/25] [sysctl.c] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 20/25] [scsi] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 21/25] [afs] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 22/25] [reiserfs] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 23/25] [drivers/misc] " Stoyan Gaydarov
2009-03-10 5:10 ` [PATCH 24/25] [crypto] " Stoyan Gaydarov
2009-03-10 5:10 ` Stoyan Gaydarov [this message]
2009-03-11 11:54 ` [PATCH 21/25] [afs] " David Howells
2009-03-13 4:51 ` [PATCH 17/25] [parisc] " Kyle McMartin
2009-03-10 7:49 ` [PATCH 16/25] [m32r] " Hirokazu Takata
2009-04-02 11:57 ` [PATCH 15/25] [cris] " Jesper Nilsson
2009-03-11 11:48 ` [PATCH 12/25] [frv] " David Howells
2009-03-11 11:36 ` [PATCH 10/25] [mn10300] " David Howells
2009-03-10 11:17 ` [PATCH 09/25] [s390] " Christian Borntraeger
2009-03-10 5:16 ` [PATCH 08/25] [sparc] " David Miller
2009-03-10 8:37 ` [PATCH 07/25] [x86] " Ingo Molnar
2009-03-10 8:57 ` [tip:x86/debug] x86: " Stoyan Gaydarov
2009-03-11 19:18 ` [PATCH 06/25] [mips] " Ralf Baechle
2009-03-10 5:16 ` [PATCH 03/25] [net] " David Miller
2009-03-10 10:23 ` Alexey Dobriyan
2009-03-10 11:24 ` David Miller
2009-03-10 19:54 ` Brandeburg, Jesse
2009-03-10 10:22 ` [PATCH 02/25] [staging] " Alexey Dobriyan
2009-03-10 9:16 ` [PATCH 01/25] [btrfs] " David John
2009-03-10 18:16 ` Stoyan Gaydarov
2009-03-10 18:20 ` Oliver Mattos
2009-03-10 13:24 ` Chris Mason
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=1236661850-8237-26-git-send-email-stoyboyker@gmail.com \
--to=stoyboyker@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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