Hi Denis,

On 2026-05-29T03:48:33, None <[email protected]> wrote:
> reset: Print reset type on diagnostic console
>
> Add a diagnostic console trace indicating the reset type.
>
> Signed-off-by: Denis Mukhin <[email protected]>
>
> drivers/sysreset/sysreset-uclass.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)

> diff --git a/drivers/sysreset/sysreset-uclass.c 
> b/drivers/sysreset/sysreset-uclass.c
> @@ -22,6 +22,22 @@
>  #include <linux/err.h>
>  #include <asm/global_data.h>
>
> +static const char *get_reset_type_str(enum sysreset_t reset_type)
> +{
> +     switch (reset_type) {
> +     case SYSRESET_WARM:
> +             return 'warm';
> +     case SYSRESET_COLD:
> +             return 'cold';
> +     case SYSRESET_POWER:
> +             return 'power';
> +     case SYSRESET_POWER_OFF:
> +             return "power off";
> +     default:
> +             return 'unknown';
> +     }
> +}
> +

This is placed outside the #if IS_ENABLED(CONFIG_SYSRESET_CMD_RESET)
block, but its only caller (do_reset()) is inside it. With
CONFIG_SYSRESET_CMD_RESET=n the static function becomes unused and
triggers -Wunused-function. Please move it inside the guard, next to
do_reset()

Regards,
Simon

Reply via email to