public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benson Leung <bleung@google.com>
To: Kyle Tso <kyletso@google.com>
Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org,
	bleung@chromium.org, badhri@google.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: Return void in typec_partner_set_pd_revision
Date: Tue, 2 Feb 2021 07:02:52 -0800	[thread overview]
Message-ID: <YBlpnMKzGBcP5Ybi@google.com> (raw)
In-Reply-To: <20210202095512.761214-1-kyletso@google.com>

[-- Attachment #1: Type: text/plain, Size: 2452 bytes --]

Hi Kyle,

On Tue, Feb 02, 2021 at 05:55:12PM +0800, Kyle Tso wrote:
> typec_partner_set_pd_revision doesn't need any return value.
> 
> Fixes: 29b01295a829 ("usb: typec: Add typec_partner_set_pd_revision")
> Signed-off-by: Kyle Tso <kyletso@google.com>

Review tags for <bleung@chromium.org>
Thanks for the quick fix!

Thanks,
Benson

> ---
>  drivers/usb/typec/class.c | 10 ++--------
>  include/linux/usb/typec.h |  2 +-
>  2 files changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index b6ceab3dc16b..a7d1bc83c2d4 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -755,15 +755,11 @@ EXPORT_SYMBOL_GPL(typec_partner_set_identity);
>   *
>   * This routine is used to report that the PD revision of the port partner has
>   * become available.
> - *
> - * Returns 0 on success or negative error number on failure.
>   */
> -int typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision)
> +void typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision)
>  {
> -	int ret;
> -
>  	if (partner->pd_revision == pd_revision)
> -		return 0;
> +		return;
>  
>  	partner->pd_revision = pd_revision;
>  	sysfs_notify(&partner->dev.kobj, NULL, "usb_power_delivery_revision");
> @@ -773,8 +769,6 @@ int typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision
>  			     "supports_usb_power_delivery");
>  	}
>  	kobject_uevent(&partner->dev.kobj, KOBJ_CHANGE);
> -
> -	return 0;
>  }
>  EXPORT_SYMBOL_GPL(typec_partner_set_pd_revision);
>  
> diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h
> index 4946eca742d5..a94df82ab62f 100644
> --- a/include/linux/usb/typec.h
> +++ b/include/linux/usb/typec.h
> @@ -126,7 +126,7 @@ struct typec_altmode_desc {
>  	enum typec_port_data	roles;
>  };
>  
> -int typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision);
> +void typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision);
>  int typec_partner_set_num_altmodes(struct typec_partner *partner, int num_altmodes);
>  struct typec_altmode
>  *typec_partner_register_altmode(struct typec_partner *partner,
> -- 
> 2.30.0.365.g02bc693789-goog
> 

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2021-02-02 15:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  9:55 [PATCH] usb: typec: Return void in typec_partner_set_pd_revision Kyle Tso
2021-02-02 15:02 ` Benson Leung [this message]
2021-02-02 15:09   ` Greg KH
2021-02-02 15:10     ` Benson Leung
2021-02-02 15:20 ` Heikki Krogerus
2021-02-02 18:46 ` Greg KH

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=YBlpnMKzGBcP5Ybi@google.com \
    --to=bleung@google.com \
    --cc=badhri@google.com \
    --cc=bleung@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=kyletso@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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