All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Ajay Gupta <ajayg@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 14/18] usb: typec: ucsi: Remove the old API
Date: Tue, 22 Oct 2019 10:04:33 +0300	[thread overview]
Message-ID: <20191022070433.GC28049@kuha.fi.intel.com> (raw)
In-Reply-To: <BYAPR12MB272730A5205C8F97AE3C37D2DC690@BYAPR12MB2727.namprd12.prod.outlook.com>

Hi Ajay,

On Mon, Oct 21, 2019 at 07:28:36PM +0000, Ajay Gupta wrote:
> Hi Heikki,
> 
> > -----Original Message-----
> > From: linux-usb-owner@vger.kernel.org <linux-usb-owner@vger.kernel.org>
> > On Behalf Of Heikki Krogerus
> > Sent: Monday, October 21, 2019 4:25 AM
> > To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Guenter Roeck <linux@roeck-us.net>; Ajay Gupta <ajayg@nvidia.com>;
> > linux-usb@vger.kernel.org
> > Subject: [PATCH 14/18] usb: typec: ucsi: Remove the old API
> > 
> > The drivers now only use the new API, so removing the old one.
> > 
> > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > ---
> >  drivers/usb/typec/ucsi/displayport.c |  24 +-
> >  drivers/usb/typec/ucsi/trace.h       |  17 --
> >  drivers/usb/typec/ucsi/ucsi.c        | 345 +++------------------------
> >  drivers/usb/typec/ucsi/ucsi.h        |  41 ----
> >  4 files changed, 43 insertions(+), 384 deletions(-)
> > 
> > diff --git a/drivers/usb/typec/ucsi/displayport.c
> > b/drivers/usb/typec/ucsi/displayport.c
> > index d99700cb4dca..47424935bc81 100644
> > --- a/drivers/usb/typec/ucsi/displayport.c
> > +++ b/drivers/usb/typec/ucsi/displayport.c
> > @@ -48,6 +48,7 @@ struct ucsi_dp {
> >  static int ucsi_displayport_enter(struct typec_altmode *alt)  {
> >  	struct ucsi_dp *dp = typec_altmode_get_drvdata(alt);
> > +	struct ucsi *ucsi = dp->con->ucsi;
> >  	struct ucsi_control ctrl;
> >  	u8 cur = 0;
> >  	int ret;
> Need to initialize "ret" otherwise we will return uninitialized value if first
> "if" condition in this function is true.

"ret" does get a value in the first "if" condition. See below.

> > @@ -59,25 +60,21 @@ static int ucsi_displayport_enter(struct typec_altmode
> > *alt)
> > 
> >  		dev_warn(&p->dev,
> >  			 "firmware doesn't support alternate mode
> > overriding\n");
> > -		mutex_unlock(&dp->con->lock);
> > -		return -EOPNOTSUPP;
> > +		ret = -EOPNOTSUPP;
                ^^^^^^^^^^^^^^^^^^
Note.

> > +		goto err_unlock;
> >  	}

thanks,

-- 
heikki

  reply	other threads:[~2019-10-22  7:04 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 11:25 [PATCH 00/18] usb: typec: API improvements Heikki Krogerus
2019-10-21 11:25 ` [PATCH 01/18] usb: typec: Copy everything from struct typec_capability during registration Heikki Krogerus
2019-10-21 11:25 ` [PATCH 02/18] usb: typec: Introduce typec_get_drvdata() Heikki Krogerus
2019-10-21 11:25 ` [PATCH 03/18] usb: typec: Separate the operations vector Heikki Krogerus
2019-10-21 11:25 ` [PATCH 04/18] usb: typec: tcpm: Start using struct typec_operations Heikki Krogerus
2019-10-21 11:25 ` [PATCH 05/18] usb: typec: tps6598x: " Heikki Krogerus
2019-10-21 11:25 ` [PATCH 06/18] usb: typec: ucsi: " Heikki Krogerus
2019-10-21 11:25 ` [PATCH 07/18] usb: typec: hd3ss3220: " Heikki Krogerus
2019-10-21 11:25 ` [PATCH 08/18] usb: typec: Remove the callback members from struct typec_capability Heikki Krogerus
2019-10-21 11:25 ` [PATCH 09/18] usb: typec: Remove unused " Heikki Krogerus
2019-10-21 11:25 ` [PATCH 10/18] usb: typec: hd3ss3220: Give the connector fwnode to the port device Heikki Krogerus
2019-10-21 13:20   ` Biju Das
2019-10-21 11:25 ` [PATCH 11/18] usb: typec: ucsi: Simplified registration and I/O API Heikki Krogerus
2019-10-21 13:17   ` Guenter Roeck
2019-10-21 13:35     ` Heikki Krogerus
2019-10-21 11:25 ` [PATCH 12/18] usb: typec: ucsi: acpi: Move to the new API Heikki Krogerus
2019-10-22  0:20   ` kbuild test robot
2019-10-22  0:20     ` kbuild test robot
2019-10-21 11:25 ` [PATCH 13/18] usb: typec: ucsi: ccg: " Heikki Krogerus
2019-10-21 11:25 ` [PATCH 14/18] usb: typec: ucsi: Remove the old API Heikki Krogerus
2019-10-21 19:28   ` Ajay Gupta
2019-10-22  7:04     ` Heikki Krogerus [this message]
2019-10-22 16:11       ` Ajay Gupta
2019-10-21 11:25 ` [PATCH 15/18] usb: typec: ucsi: Remove struct ucsi_control Heikki Krogerus
2019-10-21 11:25 ` [PATCH 16/18] usb: typec: ucsi: Remove all bit-fields Heikki Krogerus
2019-10-21 11:25 ` [PATCH 17/18] usb: typec: ucsi: New error codes Heikki Krogerus
2019-10-21 11:25 ` [PATCH 18/18] usb: typec: ucsi: Optimise ucsi_unregister() Heikki Krogerus
2019-10-21 20:41 ` [PATCH 00/18] usb: typec: API improvements Ajay Gupta
2019-10-22  7:41   ` Heikki Krogerus
2019-10-22 20:43     ` Ajay Gupta
2019-10-23  8:06       ` Heikki Krogerus
2019-10-23 16:09         ` Ajay Gupta
2019-11-11 16:51           ` Ajay Gupta
2019-11-12 11:00             ` Heikki Krogerus
2019-11-12 11:07               ` Heikki Krogerus
2019-11-12 16:38                 ` Ajay Gupta

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=20191022070433.GC28049@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=ajayg@nvidia.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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.