Re: [PATCH v3 1/5] i2c: nvidia-gpu: refactor master_xfer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 22, 2019 at 11:31:38AM -0700, Ajay Gupta wrote:
> From: Ajay Gupta <ajayg@xxxxxxxxxx>
> 
> Added a local variable "send_stop" to simplify "goto" statements.
> 
> The "send_stop" handles below two case
> 1) When first i2c start fails and so i2c stop is not sent before
> exiting
> 
> 2) When i2c stop failed after all transfers and we do not need to
> send another stop before exiting.
> 
> Signed-off-by: Ajay Gupta <ajayg@xxxxxxxxxx>

Nice! It was only a brainstorming suggestion to use a dedicated flag.
But I must say I like the outcome; much better readable code IMO.

Suggested-by: Wolfram Sang <wsa@xxxxxxxxxxxxx>
Reviewed-by: Wolfram Sang <wsa@xxxxxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux