mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: long.yunjian@zte.com.cn, sudeep.holla@arm.com, peng.fan@nxp.com,
	justin.chen@broadcom.com, florian.fainelli@broadcom.com,
	arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, fang.yumeng@zte.com.cn,
	mou.yi@zte.com.cn, ouyang.maochun@zte.com.cn,
	xu.lifeng1@zte.com.cn
Subject: Re: [PATCH] firmware: arm_scmi: Use dev_err_probe() simplify the code
Date: Fri, 16 May 2025 11:02:32 +0300	[thread overview]
Message-ID: <4c970388-4b1e-4c5c-bc54-d55c2d9cd62b@suswa.mountain> (raw)
In-Reply-To: <aCXzPGvPayVyiMHG@pluto>

On Thu, May 15, 2025 at 02:59:24PM +0100, Cristian Marussi wrote:
> On Thu, May 15, 2025 at 08:38:55PM +0800, long.yunjian@zte.com.cn wrote:
> > From: Yumeng Fang <fang.yumeng@zte.com.cn>
> > 
> 
> Hi,
> 
> > In the probe path, dev_err() can be replaced with dev_err_probe()
> > which will check if error code is -EPROBE_DEFER and prints the
> > error name. It also sets the defer probe reason which can be
> > checked later through debugfs.
> 
> All true...but...if you look at the main scmi_probe() function all of these
> failures are trapped at that level currently on the return path...
> 
> see the call chain from
> 
> scmi_probe()
> 	....
> 	ret = scmi_channels_setup(info); 
> 	...
> 
> ...so your probe errors will be overridden there with a more generic message
> left in debugfs at the top level.

Good point.  But that feels like a mistake in dev_err_probe().
Ideally, it would print the first error message.  I bet someone
will eventually fix this.

regards,
dan carpenter

  reply	other threads:[~2025-05-16  8:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-15 12:38 long.yunjian
2025-05-15 13:16 ` Dan Carpenter
2025-05-15 13:59 ` Cristian Marussi
2025-05-16  8:02   ` Dan Carpenter [this message]
2025-05-16 15:23   ` Christophe JAILLET
2025-05-16 15:25 ` Christophe JAILLET
2025-05-21  7:59   ` long.yunjian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c970388-4b1e-4c5c-bc54-d55c2d9cd62b@suswa.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=arm-scmi@vger.kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=fang.yumeng@zte.com.cn \
    --cc=florian.fainelli@broadcom.com \
    --cc=justin.chen@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=long.yunjian@zte.com.cn \
    --cc=mou.yi@zte.com.cn \
    --cc=ouyang.maochun@zte.com.cn \
    --cc=peng.fan@nxp.com \
    --cc=sudeep.holla@arm.com \
    --cc=xu.lifeng1@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®