[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1312281304-11847-4-git-send-email-julia@diku.dk>
Date: Tue, 2 Aug 2011 12:34:56 +0200
From: Julia Lawall <julia@...u.dk>
To: Ben Dooks <ben-linux@...ff.org>, trivial@...nel.org
Cc: kernel-janitors@...r.kernel.org,
Russell King <linux@....linux.org.uk>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/11] arch/arm/mach-s3c64xx/dma.c: trivial: use BUG_ON
From: Julia Lawall <julia@...u.dk>
Use BUG_ON(x) rather than if(x) BUG();
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@ identifier x; @@
-if (x) BUG();
+BUG_ON(x);
@@ identifier x; @@
-if (!x) BUG();
+BUG_ON(!x);
// </smpl>
Signed-off-by: Julia Lawall <julia@...u.dk>
---
arch/arm/mach-s3c64xx/dma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -u -p a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
--- a/arch/arm/mach-s3c64xx/dma.c
+++ b/arch/arm/mach-s3c64xx/dma.c
@@ -603,8 +603,7 @@ static irqreturn_t s3c64xx_dma_irq(int i
&& buff->next != chan->next)
buff = buff->next;
- if (!buff)
- BUG();
+ BUG_ON(!buff);
if (buff == chan->next)
buff = chan->end;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists