aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/xen
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-07-25 12:05:39 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2014-07-25 12:05:48 -0400
commita91c7775e3469821711c1eadf15149b3ba2c82c9 (patch)
treee97ec9b8767875b05e645ed69ba5fafe023130dd /arch/arm/xen
parent438b33c7145ca8a5131a30c36d8f59bce119a19a (diff)
xen/arm: use BUG_ON
Use BUG_ON(x) rather than if(x) BUG(); The semantic patch that fixes this problem is as follows: // <smpl> @@ identifier x; @@ -if (x) BUG(); +BUG_ON(x); // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'arch/arm/xen')
-rw-r--r--arch/arm/xen/enlighten.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 1e632430570b..98544c5f86e9 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -181,8 +181,7 @@ static void xen_restart(enum reboot_mode reboot_mode, const char *cmd)
181 struct sched_shutdown r = { .reason = SHUTDOWN_reboot }; 181 struct sched_shutdown r = { .reason = SHUTDOWN_reboot };
182 int rc; 182 int rc;
183 rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); 183 rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
184 if (rc) 184 BUG_ON(rc);
185 BUG();
186} 185}
187 186
188static void xen_power_off(void) 187static void xen_power_off(void)
@@ -190,8 +189,7 @@ static void xen_power_off(void)
190 struct sched_shutdown r = { .reason = SHUTDOWN_poweroff }; 189 struct sched_shutdown r = { .reason = SHUTDOWN_poweroff };
191 int rc; 190 int rc;
192 rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); 191 rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
193 if (rc) 192 BUG_ON(rc);
194 BUG();
195} 193}
196 194
197static int xen_cpu_notification(struct notifier_block *self, 195static int xen_cpu_notification(struct notifier_block *self,