diff mbox series

[1/4] core/hmi: fix endian conversion bug

Message ID 20241110125637.400520-1-npiggin@gmail.com
State New
Headers show
Series [1/4] core/hmi: fix endian conversion bug | expand

Commit Message

Nicholas Piggin Nov. 10, 2024, 12:56 p.m. UTC
Fix an endian conversion bug in HMI checkstop reporting.

Noticed by sparse.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 core/hmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/core/hmi.c b/core/hmi.c
index 7f4211c5d..728d3637e 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -915,7 +915,7 @@  static void find_npu_checkstop_reason(int flat_chip_id,
 		hmi_evt->severity = OpalHMI_SEV_WARNING;
 		hmi_evt->type = OpalHMI_ERROR_MALFUNC_ALERT;
 		hmi_evt->u.xstop_error.xstop_type = CHECKSTOP_TYPE_NPU;
-		hmi_evt->u.xstop_error.xstop_reason = xstop_reason;
+		hmi_evt->u.xstop_error.xstop_reason = cpu_to_be32(xstop_reason);
 		hmi_evt->u.xstop_error.u.chip_id = cpu_to_be32(flat_chip_id);
 
 		/* Marking the event as recoverable so that we don't crash */