[PATCH] clk: imx: clk-gpr-mux: Provide clock name in error message

Peng Fan peng.fan at nxp.com
Wed Mar 8 17:10:54 PST 2023


> Subject: [PATCH] clk: imx: clk-gpr-mux: Provide clock name in error message
> 
> In error case the error message doesn't provide much context:
> 
> imx:clk-gpr-mux: failed to get parent (-EINVAL)
> 
> So additionally provide the clock name in the message, in order to simplify
> the further analyze.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
[Peng Fan] 

Reviewed-by: Peng Fan <peng.fan at nxp.com>
> ---
>  drivers/clk/imx/clk-gpr-mux.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/imx/clk-gpr-mux.c b/drivers/clk/imx/clk-gpr-mux.c
> index c8d6090f15d6..0b5a97698b47 100644
> --- a/drivers/clk/imx/clk-gpr-mux.c
> +++ b/drivers/clk/imx/clk-gpr-mux.c
> @@ -48,7 +48,8 @@ static u8 imx_clk_gpr_mux_get_parent(struct clk_hw
> *hw)
>  	return ret;
> 
>  get_parent_err:
> -	pr_err("failed to get parent (%pe)\n", ERR_PTR(ret));
> +	pr_err("%s: failed to get parent (%pe)\n",
> +	       clk_hw_get_name(hw), ERR_PTR(ret));
> 
>  	/* return some realistic non negative value. Potentially we could
>  	 * give index to some dummy error parent.
> --
> 2.34.1




More information about the linux-arm-kernel mailing list