diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2012-11-08 21:23:08 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-11-17 19:44:39 +0100 |
commit | f7a9b36517d38cfa2213a346b154d2d7046ff223 (patch) | |
tree | a1725e9c8e3b4e67e579d2a6d0035eceab31acd4 /arch/arm/mach-integrator | |
parent | ARM: integrator: push down SC dependencies (diff) | |
download | linux-f7a9b36517d38cfa2213a346b154d2d7046ff223.tar.xz linux-f7a9b36517d38cfa2213a346b154d2d7046ff223.zip |
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: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r-- | arch/arm/mach-integrator/pci_v3.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 000edcda4596..be50e795536d 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -191,12 +191,9 @@ static void __iomem *v3_open_config_window(struct pci_bus *bus, /* * Trap out illegal values */ - if (offset > 255) - BUG(); - if (busnr > 255) - BUG(); - if (devfn > 255) - BUG(); + BUG_ON(offset > 255); + BUG_ON(busnr > 255); + BUG_ON(devfn > 255); if (busnr == 0) { int slot = PCI_SLOT(devfn); |