lkml.org 
[lkml]   [2020]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/1] Input: atmel_mxt_ts - implement I2C retries
From
Date
11.09.2020 18:05, Dmitry Osipenko пишет:
> 11.09.2020 17:50, Dmitry Osipenko пишет:
> ...
>>> @@ -626,6 +627,7 @@ static int __mxt_read_reg(struct i2c_client *client,
>>> struct i2c_msg xfer[2];
>>> u8 buf[2];
>>> int ret;
>>> + bool retry = false;
>
> Andy suggested to write this hunk like this:
>
> struct i2c_msg xfer[2];
> bool retry = false;
> u8 buf[2];
> int ret;
>
> This is not a mandatory request at all, but it will make this particular
> piece of code to look a bit nicer.
>
> There is also an opportunity to improve formatting of all variables by
> sorting them by-length across the whole driver, this will improve
> readability of the code. But of course it should be a separate patch.
> Please note that I'm *not* saying that you should create this separate
> patch!
>

I'd also recommend to rename the "retry" variable to "retried", which
will be a more logical name (more proper English).

\
 
 \ /
  Last update: 2020-09-11 18:42    [W:0.063 / U:1.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site