qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 20/39] hw/ppc: replace assert(false) with g_assert_not_reache


From: Pierrick Bouvier
Subject: Re: [PATCH 20/39] hw/ppc: replace assert(false) with g_assert_not_reached()
Date: Wed, 11 Sep 2024 08:32:08 -0700
User-agent: Mozilla Thunderbird

On 9/11/24 07:10, BALATON Zoltan wrote:


On Tue, 10 Sep 2024, Pierrick Bouvier wrote:

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
hw/ppc/spapr_events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
index cb0eeee5874..38ac1cb7866 100644
--- a/hw/ppc/spapr_events.c
+++ b/hw/ppc/spapr_events.c
@@ -645,7 +645,7 @@ static void spapr_hotplug_req_event(uint8_t hp_id, uint8_t 
hp_action,
         /* we shouldn't be signaling hotplug events for resources
          * that don't support them
          */
-        g_assert(false);
+        g_assert_not_reached();
         return;
     }

If break does not make sense after g_assert_not_reached() and removed then
return is the same here.

It may make the series shorter and easier to check that none of these are
missed if this is done in the same patch where the assert is changed
instead of separate patches. It's unlikely that the assert change and
removal of the following break or return would need to be reverted
separately so it's a simple enough change to put in one patch in my
opinion but I don't mink if it's kept separate either.

Regards,
BALATON Zoltan

Mostly done this way because it's easy for creating many commits.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]