All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Wayne Chang <waynec@nvidia.com>
Cc: gregkh@linuxfoundation.org, quic_linyyuan@quicinc.com,
	quic_jackp@quicinc.com, saranya.gopal@intel.com, tiwai@suse.de,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/1] usb: typec: ucsi: Don't warn on probe deferral
Date: Wed, 28 Sep 2022 09:23:46 +0300	[thread overview]
Message-ID: <YzPocs9hMZBuQ3Pp@kuha.fi.intel.com> (raw)
In-Reply-To: <20220927134512.2651067-1-waynec@nvidia.com>

On Tue, Sep 27, 2022 at 09:45:12PM +0800, Wayne Chang wrote:
> Deferred probe is an expected return value for fwnode_usb_role_switch_get().
> Given that the driver deals with it properly, there's no need to output a
> warning that may potentially confuse users.
> 
> Signed-off-by: Wayne Chang <waynec@nvidia.com>

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> --
> V2 -> V3: remove the Fixes and Cc
> V1 -> V2: adjust the coding style for better reading format.
>  drivers/usb/typec/ucsi/ucsi.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 7f2624f42724..e961ebecd7df 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1069,11 +1069,9 @@ static int ucsi_register_port(struct ucsi *ucsi, int index)
>  
>  	cap->fwnode = ucsi_find_fwnode(con);
>  	con->usb_role_sw = fwnode_usb_role_switch_get(cap->fwnode);
> -	if (IS_ERR(con->usb_role_sw)) {
> -		dev_err(ucsi->dev, "con%d: failed to get usb role switch\n",
> -			con->num);
> -		return PTR_ERR(con->usb_role_sw);
> -	}
> +	if (IS_ERR(con->usb_role_sw))
> +		return dev_err_probe(ucsi->dev, PTR_ERR(con->usb_role_sw),
> +			"con%d: failed to get usb role switch\n", con->num);
>  
>  	/* Delay other interactions with the con until registration is complete */
>  	mutex_lock(&con->lock);

thanks,

-- 
heikki

      reply	other threads:[~2022-09-28  6:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 13:45 [PATCH v3 1/1] usb: typec: ucsi: Don't warn on probe deferral Wayne Chang
2022-09-28  6:23 ` Heikki Krogerus [this message]

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=YzPocs9hMZBuQ3Pp@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_linyyuan@quicinc.com \
    --cc=saranya.gopal@intel.com \
    --cc=tiwai@suse.de \
    --cc=waynec@nvidia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.