[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 16/23] hw/intc/sh_intc: Replace abort() with g_assert_not_reac
From: |
BALATON Zoltan |
Subject: |
[PATCH v4 16/23] hw/intc/sh_intc: Replace abort() with g_assert_not_reached() |
Date: |
Thu, 28 Oct 2021 21:27:05 +0200 |
All the places that call abort should not happen which is better
marked by g_assert_not_reached.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/intc/sh_intc.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c
index 57c341c030..56a288e093 100644
--- a/hw/intc/sh_intc.c
+++ b/hw/intc/sh_intc.c
@@ -96,8 +96,7 @@ int sh_intc_get_pending_vector(struct intc_desc *desc, int
imask)
return source->vect;
}
}
-
- abort();
+ g_assert_not_reached();
}
#define INTC_MODE_IS_PRIO 0x80
@@ -169,8 +168,7 @@ static void sh_intc_locate(struct intc_desc *desc,
return;
}
}
-
- abort();
+ g_assert_not_reached();
}
static void sh_intc_toggle_mask(struct intc_desc *desc, intc_enum id,
@@ -241,7 +239,7 @@ static void sh_intc_write(void *opaque, hwaddr offset,
value = *valuep & ~value;
break;
default:
- abort();
+ g_assert_not_reached();
}
for (k = 0; k <= first; k++) {
--
2.21.4
- [PATCH v4 09/23] hw/intc/sh_intc: Turn some defines into an enum, (continued)
- [PATCH v4 09/23] hw/intc/sh_intc: Turn some defines into an enum, BALATON Zoltan, 2021/10/28
- [PATCH v4 06/23] hw/char/sh_serial: QOM-ify, BALATON Zoltan, 2021/10/28
- [PATCH v4 13/23] hw/intc/sh_intc: Remove excessive parenthesis, BALATON Zoltan, 2021/10/28
- [PATCH v4 11/23] hw/intc/sh_intc: Drop another useless macro, BALATON Zoltan, 2021/10/28
- [PATCH v4 23/23] hw/timer/sh_timer: Fix timer memory region size, BALATON Zoltan, 2021/10/28
- [PATCH v4 20/23] hw/timer/sh_timer: Rename sh_timer_state to SHTimerState, BALATON Zoltan, 2021/10/28
- [PATCH v4 16/23] hw/intc/sh_intc: Replace abort() with g_assert_not_reached(),
BALATON Zoltan <=
- [PATCH v4 21/23] hw/timer/sh_timer: Fix format strings and remove casts, BALATON Zoltan, 2021/10/28
- [PATCH v4 22/23] hw/timer/sh_timer: Do not wrap lines that are not too long, BALATON Zoltan, 2021/10/28
- [PATCH v4 17/23] hw/intc/sh_intc: Avoid using continue in loops, BALATON Zoltan, 2021/10/28
- [PATCH v4 18/23] hw/intc/sh_intc: Simplify allocating sources array, BALATON Zoltan, 2021/10/28