Message ID | 20230131095340.600363-1-alexander.stein@ew.tq-group.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/1] firmware: imx: scu: use dev_err_probe | expand |
On 1/31/2023 3:23 PM, Alexander Stein wrote: > This simplifies the code and silences -517 error messages. Also > the reason is listed in /sys/kernel/debug/devices_deferred. > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> LGTM. Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com> -Mukesh > --- > drivers/firmware/imx/imx-scu.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c > index dca79caccd01..47db49911e7b 100644 > --- a/drivers/firmware/imx/imx-scu.c > +++ b/drivers/firmware/imx/imx-scu.c > @@ -310,9 +310,8 @@ static int imx_scu_probe(struct platform_device *pdev) > sc_chan->ch = mbox_request_channel_byname(cl, chan_name); > if (IS_ERR(sc_chan->ch)) { > ret = PTR_ERR(sc_chan->ch); > - if (ret != -EPROBE_DEFER) > - dev_err(dev, "Failed to request mbox chan %s ret %d\n", > - chan_name, ret); > + dev_err_probe(dev, ret, "Failed to request mbox chan %s\n", > + chan_name); > kfree(chan_name); > return ret; > }
On Tue, Jan 31, 2023 at 10:53:40AM +0100, Alexander Stein wrote: > This simplifies the code and silences -517 error messages. Also > the reason is listed in /sys/kernel/debug/devices_deferred. > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Applied, thanks!
diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c index dca79caccd01..47db49911e7b 100644 --- a/drivers/firmware/imx/imx-scu.c +++ b/drivers/firmware/imx/imx-scu.c @@ -310,9 +310,8 @@ static int imx_scu_probe(struct platform_device *pdev) sc_chan->ch = mbox_request_channel_byname(cl, chan_name); if (IS_ERR(sc_chan->ch)) { ret = PTR_ERR(sc_chan->ch); - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to request mbox chan %s ret %d\n", - chan_name, ret); + dev_err_probe(dev, ret, "Failed to request mbox chan %s\n", + chan_name); kfree(chan_name); return ret; }
This simplifies the code and silences -517 error messages. Also the reason is listed in /sys/kernel/debug/devices_deferred. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> --- drivers/firmware/imx/imx-scu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)