[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/30] hw/intc/sh_intc: Replace abort() with g_assert_not_reached(
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 23/30] hw/intc/sh_intc: Replace abort() with g_assert_not_reached() |
Date: |
Sat, 30 Oct 2021 19:06:08 +0200 |
From: BALATON Zoltan <balaton@eik.bme.hu>
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>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id:
<039e6a784532f2af27f8adeafdb8e0391722f567.1635541329.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.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 9995213cb0b..a0db742d75d 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();
}
typedef enum {
@@ -168,8 +167,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,
@@ -240,7 +238,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.31.1
- [PULL 13/30] hw/char/sh_serial: QOM-ify, (continued)
- [PULL 13/30] hw/char/sh_serial: QOM-ify, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 14/30] hw/char/sh_serial: Add device id to trace output, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 15/30] hw/intc/sh_intc: Use existing macro instead of local one, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 16/30] hw/intc/sh_intc: Turn some defines into an enum, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 17/30] hw/intc/sh_intc: Rename iomem region, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 18/30] hw/intc/sh_intc: Drop another useless macro, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 19/30] hw/intc/sh_intc: Move sh_intc_register() closer to its only user, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 20/30] hw/intc/sh_intc: Remove excessive parenthesis, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 21/30] hw/intc/sh_intc: Use array index instead of pointer arithmetics, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 22/30] hw/intc/sh_intc: Inline and drop sh_intc_source() function, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 23/30] hw/intc/sh_intc: Replace abort() with g_assert_not_reached(),
Philippe Mathieu-Daudé <=
- [PULL 24/30] hw/intc/sh_intc: Avoid using continue in loops, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 25/30] hw/intc/sh_intc: Simplify allocating sources array, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 26/30] hw/intc/sh_intc: Remove unneeded local variable initialisers, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 27/30] hw/timer/sh_timer: Rename sh_timer_state to SHTimerState, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 28/30] hw/timer/sh_timer: Do not wrap lines that are not too long, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 29/30] hw/timer/sh_timer: Fix timer memory region size, Philippe Mathieu-Daudé, 2021/10/30
- [PULL 30/30] hw/timer/sh_timer: Remove use of hw_error, Philippe Mathieu-Daudé, 2021/10/30
- Re: [PULL 00/30] Renesas SH-4 patches for 2021-10-30, Richard Henderson, 2021/10/30