Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488368

[PATCH] ata: Replace BUG() with BUG_ON().

From Harman Kalra <harman4linux@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] ata: Replace BUG() with BUG_ON().
Date 2016-09-21 22:10 +0200
Message-ID <sjW0a-545-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Replace BUG() with BUG_ON().
Caught by coccinelle.

Signed-off-by: Harman Kalra <harman4linux@gmail.com>
---
 drivers/ata/pata_octeon_cf.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 2724595..475a006 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -152,8 +152,7 @@ static void octeon_cf_set_piomode(struct ata_port *ap, struct ata_device *dev)
 		div = 8;
 	T = (int)((1000000000000LL * div) / octeon_get_io_clock_rate());
 
-	if (ata_timing_compute(dev, dev->pio_mode, &timing, T, T))
-		BUG();
+	BUG_ON(ata_timing_compute(dev, dev->pio_mode, &timing, T, T));
 
 	t1 = timing.setup;
 	if (t1)
-- 
1.7.9.5

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] ata: Replace BUG() with BUG_ON(). Harman Kalra <harman4linux@gmail.com> - 2016-09-21 22:10 +0200
  Re: [PATCH] ata: Replace BUG() with BUG_ON(). Tejun Heo <tj@kernel.org> - 2016-09-22 17:50 +0200

csiph-web