All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: raoxu <raoxu@uniontech.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: hd3ss3220: fix VBUS regulator error message
Date: Wed, 12 Aug 2026 11:06:24 +0200	[thread overview]
Message-ID: <anw3kAlK_KOtyEak@black.igk.intel.com> (raw)
In-Reply-To: <860D4D55E131FB70+20260807081422.626412-1-raoxu@uniontech.com>

On Fri, Aug 07, 2026 at 04:14:22PM +0800, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
> 
> hd3ss3220_regulator_control() enables the VBUS regulator when @on is
> true and disables it when @on is false.  However, its error message uses
> the opposite operation name, so an enable failure is reported as a
> disable failure and vice versa.
> 
> Print the operation that was actually attempted.  Reporting the opposite
> regulator operation on failures can mislead debugging of VBUS problems.
> 
> Fixes: 27fbc19e52b9 ("usb: typec: hd3ss3220: Enable VBUS based on role state")
> Signed-off-by: Xu Rao <raoxu@uniontech.com>

Please CC stable. With that fixed:

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

> ---
>  drivers/usb/typec/hd3ss3220.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/hd3ss3220.c b/drivers/usb/typec/hd3ss3220.c
> index 3e39b800e6b5..d0de5a2488f9 100644
> --- a/drivers/usb/typec/hd3ss3220.c
> +++ b/drivers/usb/typec/hd3ss3220.c
> @@ -218,7 +218,7 @@ static void hd3ss3220_regulator_control(struct hd3ss3220 *hd3ss3220, bool on)
>  
>  	if (ret)
>  		dev_err(hd3ss3220->dev,
> -			"vbus regulator %s failed: %d\n", on ? "disable" : "enable", ret);
> +			"vbus regulator %s failed: %d\n", on ? "enable" : "disable", ret);
>  }
>  
>  static void hd3ss3220_set_role(struct hd3ss3220 *hd3ss3220)
> -- 
> 2.50.1

-- 
heikki

      reply	other threads:[~2026-08-12  9:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07  8:14 [PATCH] usb: typec: hd3ss3220: fix VBUS regulator error message raoxu
2026-08-12  9:06 ` 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=anw3kAlK_KOtyEak@black.igk.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=raoxu@uniontech.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.