Message ID | 20230308184603.10049-1-stefan.wahren@i2se.com (mailing list archive) |
---|---|
State | Awaiting Upstream, archived |
Headers | show |
Series | clk: imx: clk-gpr-mux: Provide clock name in error message | expand |
> 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@i2se.com> [Peng Fan] Reviewed-by: Peng Fan <peng.fan@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
On 23-03-08 19:46:03, Stefan Wahren wrote: > 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@i2se.com> Applied, thanks! [1/1] clk: imx: clk-gpr-mux: Provide clock name in error message commit: f47a669ffa11c6c14b463d762562fe9681345c6e Best regards, -- Abel Vesa <abel.vesa@linaro.org> > --- > 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 >
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.
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@i2se.com> --- drivers/clk/imx/clk-gpr-mux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)