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

Mahesh J Salgaonkar mahesh at linux.ibm.com
Sat Apr 9 16:05:20 AEST 2022


On 2022-04-09 01:31:34 Sat, Nicholas Piggin wrote:
> Fix an endian conversion bug in HMI checkstop reporting.
> 
> Noticed by sparse.
> 
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
>  core/hmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/core/hmi.c b/core/hmi.c
> index ce5abd7d6..46dc20dbb 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);

Acked-by: Mahesh Salgaonkar <mahesh at linux.ibm.com>

Thanks,
-Mahesh.

>  		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 */
> -- 
> 2.23.0
> 
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot

-- 
Mahesh J Salgaonkar


More information about the Skiboot mailing list