Commit f7a9b365 authored by Sasha Levin's avatar Sasha Levin Committed by Linus Walleij

ARM: integrator: use BUG_ON where possible

Just use BUG_ON() instead of constructions such as:

	if (...)
		BUG()

A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
@@
- if (e) BUG();
+ BUG_ON(e);
// </smpl>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 379df279
...@@ -191,12 +191,9 @@ static void __iomem *v3_open_config_window(struct pci_bus *bus, ...@@ -191,12 +191,9 @@ static void __iomem *v3_open_config_window(struct pci_bus *bus,
/* /*
* Trap out illegal values * Trap out illegal values
*/ */
if (offset > 255) BUG_ON(offset > 255);
BUG(); BUG_ON(busnr > 255);
if (busnr > 255) BUG_ON(devfn > 255);
BUG();
if (devfn > 255)
BUG();
if (busnr == 0) { if (busnr == 0) {
int slot = PCI_SLOT(devfn); int slot = PCI_SLOT(devfn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment