From: Sasha Levin Date: Thu, 8 Nov 2012 20:23:08 +0000 (-0500) Subject: ARM: integrator: use BUG_ON where possible X-Git-Tag: v3.8-rc1~144^2~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7a9b36517d38cfa2213a346b154d2d7046ff223;p=platform%2Fkernel%2Flinux-exynos.git 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/) // @@ expression e; @@ - if (e) BUG(); + BUG_ON(e); // Signed-off-by: Sasha Levin Acked-by: Arnd Bergmann Signed-off-by: Linus Walleij --- diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 000edcd..be50e79 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);