linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Ajay Gupta <ajaykuee@gmail.com>
Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org,
	linux-i2c@vger.kernel.org, Ajay Gupta <ajayg@nvidia.com>
Subject: Re: [PATCH v4 1/5] i2c: nvidia-gpu: refactor master_xfer
Date: Fri, 7 Jun 2019 10:33:23 +0200	[thread overview]
Message-ID: <20190607083322.GC3360@kunai> (raw)
In-Reply-To: <20190603170545.24004-2-ajayg@nvidia.com>

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

> Changes from v3->v4:
> 	- Further refactor master_xfer based on Wolfram's comment.

Yay, looks even better. One thing to improve, though.

>  	status = gpu_i2c_stop(i2cd);

send_stop = false;

> -	if (status < 0)
> -		return status;
> +	if (status < 0) {
> +		send_stop = false;

and skip it here...

> +		goto exit;
> +	}
>  
> -	return i;
> -stop:
> -	status2 = gpu_i2c_stop(i2cd);
> -	if (status2 < 0)
> -		dev_err(i2cd->dev, "i2c stop failed %d\n", status2);
> +	send_stop = false;

... and here.


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

  reply	other threads:[~2019-06-07  8:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 17:05 [PATCH v4 0/5] usb: typec: ucsi: ccg: add runtime pm support Ajay Gupta
2019-06-03 17:05 ` [PATCH v4 1/5] i2c: nvidia-gpu: refactor master_xfer Ajay Gupta
2019-06-07  8:33   ` Wolfram Sang [this message]
2019-06-07 15:47     ` Ajay Gupta
2019-06-03 17:05 ` [PATCH v4 2/5] i2c: nvidia-gpu: add runtime pm support Ajay Gupta
2019-06-07  8:33   ` Wolfram Sang
2019-06-07 15:47     ` Ajay Gupta
2019-06-03 17:05 ` [PATCH v4 3/5] usb: typec: ucsi: ccg: enable " Ajay Gupta
2019-06-07  8:25   ` Heikki Krogerus
2019-06-07  8:27     ` Wolfram Sang
2019-06-07 15:46       ` Ajay Gupta
2019-06-03 17:05 ` [PATCH v4 4/5] i2c: nvidia-gpu: resume ccgx i2c client Ajay Gupta
2019-06-03 17:05 ` [PATCH v4 5/5] usb: typec: ucsi: ccg: add runtime pm workaround Ajay Gupta
2019-06-07  8:25   ` Heikki Krogerus

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=20190607083322.GC3360@kunai \
    --to=wsa@the-dreams.de \
    --cc=ajayg@nvidia.com \
    --cc=ajaykuee@gmail.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-i2c@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;
as well as URLs for NNTP newsgroup(s).