diff mbox series

[v2,1/4] iio:potentiostat:lmp91000: remove unnecessary parentheses

Message ID 20190308194655.5983-2-anderson.reis.rosa@usp.com (mailing list archive)
State New, archived
Headers show
Series iio:potentiostat:lmp91000: Adjust codestyle, and minor cleanup changes | expand

Commit Message

Anderson Reis March 8, 2019, 7:46 p.m. UTC
From: Lucas Oshiro <lucasseikioshiro@gmail.com>

Remove unnecessary parentheses on line 116, and solve these checkpatch.pl
CHECKs:

- lmp91000.c:116: CHECK: Unnecessary parentheses around 'state != channel'
- lmp91000.c:116: CHECK: Unnecessary parentheses around 'channel == LMP91000_REG_MODECN_TEMP'

Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com>
---
 drivers/iio/potentiostat/lmp91000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tomasz Duszynski March 8, 2019, 9:04 p.m. UTC | #1
On Fri, Mar 08, 2019 at 04:46:52PM -0300, Anderson Reis wrote:
> From: Lucas Oshiro <lucasseikioshiro@gmail.com>
>
> Remove unnecessary parentheses on line 116, and solve these checkpatch.pl

No need to explicitly point finger at changed lines. This is what
context lines are for.

> CHECKs:
>
> - lmp91000.c:116: CHECK: Unnecessary parentheses around 'state != channel'
> - lmp91000.c:116: CHECK: Unnecessary parentheses around 'channel == LMP91000_REG_MODECN_TEMP'
>
> Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>
> Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com>
> ---
>  drivers/iio/potentiostat/lmp91000.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
> index 90e895adf997..03d277621861 100644
> --- a/drivers/iio/potentiostat/lmp91000.c
> +++ b/drivers/iio/potentiostat/lmp91000.c
> @@ -113,7 +113,7 @@ static int lmp91000_read(struct lmp91000_data *data, int channel, int *val)
>  		return -EINVAL;
>
>  	/* delay till first temperature reading is complete */
> -	if ((state != channel) && (channel == LMP91000_REG_MODECN_TEMP))
> +	if (state != channel && channel == LMP91000_REG_MODECN_TEMP)
>  		usleep_range(3000, 4000);
>
>  	data->chan_select = channel != LMP91000_REG_MODECN_3LEAD;
> --
> 2.20.1
>
Jonathan Cameron March 9, 2019, 6:44 p.m. UTC | #2
On Fri, 8 Mar 2019 19:26:16 -0300
Anderson Reis <andersonreisrosa@gmail.com> wrote:

> Hi, Tomasz
> 
> thanks for the guidance.
Applied with the description tweaked.

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> 
> 
> 
> On Fri, Mar 8, 2019, 18:04 Tomasz Duszynski <tduszyns@gmail.com> wrote:
> 
> > On Fri, Mar 08, 2019 at 04:46:52PM -0300, Anderson Reis wrote:  
> > > From: Lucas Oshiro <lucasseikioshiro@gmail.com>
> > >
> > > Remove unnecessary parentheses on line 116, and solve these  
> > checkpatch.pl
> >
> > No need to explicitly point finger at changed lines. This is what
> > context lines are for.
> >  
> > > CHECKs:
> > >
> > > - lmp91000.c:116: CHECK: Unnecessary parentheses around 'state !=  
> > channel'  
> > > - lmp91000.c:116: CHECK: Unnecessary parentheses around 'channel ==  
> > LMP91000_REG_MODECN_TEMP'  
> > >
> > > Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>
> > > Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com>
> > > ---
> > >  drivers/iio/potentiostat/lmp91000.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/iio/potentiostat/lmp91000.c  
> > b/drivers/iio/potentiostat/lmp91000.c  
> > > index 90e895adf997..03d277621861 100644
> > > --- a/drivers/iio/potentiostat/lmp91000.c
> > > +++ b/drivers/iio/potentiostat/lmp91000.c
> > > @@ -113,7 +113,7 @@ static int lmp91000_read(struct lmp91000_data *data,  
> > int channel, int *val)  
> > >               return -EINVAL;
> > >
> > >       /* delay till first temperature reading is complete */
> > > -     if ((state != channel) && (channel == LMP91000_REG_MODECN_TEMP))
> > > +     if (state != channel && channel == LMP91000_REG_MODECN_TEMP)
> > >               usleep_range(3000, 4000);
> > >
> > >       data->chan_select = channel != LMP91000_REG_MODECN_3LEAD;
> > > --
> > > 2.20.1
> > >  
> >
diff mbox series

Patch

diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
index 90e895adf997..03d277621861 100644
--- a/drivers/iio/potentiostat/lmp91000.c
+++ b/drivers/iio/potentiostat/lmp91000.c
@@ -113,7 +113,7 @@  static int lmp91000_read(struct lmp91000_data *data, int channel, int *val)
 		return -EINVAL;
 
 	/* delay till first temperature reading is complete */
-	if ((state != channel) && (channel == LMP91000_REG_MODECN_TEMP))
+	if (state != channel && channel == LMP91000_REG_MODECN_TEMP)
 		usleep_range(3000, 4000);
 
 	data->chan_select = channel != LMP91000_REG_MODECN_3LEAD;