[PATCH] powernv/hmi: Use the "unknown" checkstop type as a fallback

Daniel Axtens dja at axtens.net
Tue Mar 15 14:41:29 AEDT 2016


Russell Currey <ruscur at russell.cc> writes:

> The HMI code knows about three types of errors: CORE, NX and UNKNOWN.
> If OPAL were to add a new type, it would not be handled at all since
> there is no fallback case.  Instead of explicitly checking for UNKNOWN,
> treat any checkstop type without a handler as unknown.
>

Just checked the surrounding function; you're quite right.
Reviewed-by: Daniel Axtens <dja at axtens.net>

> Signed-off-by: Russell Currey <ruscur at russell.cc>
> ---
>  arch/powerpc/platforms/powernv/opal-hmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/powernv/opal-hmi.c b/arch/powerpc/platforms/powernv/opal-hmi.c
> index d000f4e..bff4dd1 100644
> --- a/arch/powerpc/platforms/powernv/opal-hmi.c
> +++ b/arch/powerpc/platforms/powernv/opal-hmi.c
> @@ -157,7 +157,7 @@ static void print_checkstop_reason(const char *level,
>  	case CHECKSTOP_TYPE_NX:
>  		print_nx_checkstop_reason(level, hmi_evt);
>  		break;
> -	case CHECKSTOP_TYPE_UNKNOWN:
> +	default:
>  		printk("%s	Unknown Malfunction Alert.\n", level);
>  		break;
>  	}
> -- 
> 2.7.3
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev


More information about the Linuxppc-dev mailing list