diff mbox series

iio: adc: ad7292: Modify the bool initialization assignment

Message ID 20210319062706.5135-1-chi962464zy@163.com (mailing list archive)
State New, archived
Headers show
Series iio: adc: ad7292: Modify the bool initialization assignment | expand

Commit Message

Guoqing Chi March 19, 2021, 6:27 a.m. UTC
From: Guoqing Chi <chiguoqing@yulong.com>

A bool initializer is best assigned to false rather than 0.

Signed-off-by: Guoqing Chi <chiguoqing@yulong.com>
---
 drivers/iio/adc/ad7292.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marcelo Schmitt March 20, 2021, 2:21 p.m. UTC | #1
Okay, looks good to me.

Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>

On 03/19, Guoqing chi wrote:
> From: Guoqing Chi <chiguoqing@yulong.com>
> 
> A bool initializer is best assigned to false rather than 0.
> 
> Signed-off-by: Guoqing Chi <chiguoqing@yulong.com>
> ---
>  drivers/iio/adc/ad7292.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad7292.c b/drivers/iio/adc/ad7292.c
> index 70e33dd1c9f7..3271a31afde1 100644
> --- a/drivers/iio/adc/ad7292.c
> +++ b/drivers/iio/adc/ad7292.c
> @@ -260,7 +260,7 @@ static int ad7292_probe(struct spi_device *spi)
>  	struct ad7292_state *st;
>  	struct iio_dev *indio_dev;
>  	struct device_node *child;
> -	bool diff_channels = 0;
> +	bool diff_channels = false;
>  	int ret;
>  
>  	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
> -- 
> 2.17.1
> 
>
Jonathan Cameron March 20, 2021, 3:07 p.m. UTC | #2
On Fri, 19 Mar 2021 14:27:06 +0800
Guoqing chi <chi962464zy@163.com> wrote:

> From: Guoqing Chi <chiguoqing@yulong.com>
> 
> A bool initializer is best assigned to false rather than 0.
> 
> Signed-off-by: Guoqing Chi <chiguoqing@yulong.com>

Hi

This one is a bit marginal as counting as noise rather that a useful
change in an existing driver. I'll take it this time, but I'm not
keen to see lots of these unless they form part of larger sets cleaning
up the drivers in question.

Applied to the togreg branch of iio.git and pushed out as testing for
the auto builders to ignore it.

thanks,

Jonathan

> ---
>  drivers/iio/adc/ad7292.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad7292.c b/drivers/iio/adc/ad7292.c
> index 70e33dd1c9f7..3271a31afde1 100644
> --- a/drivers/iio/adc/ad7292.c
> +++ b/drivers/iio/adc/ad7292.c
> @@ -260,7 +260,7 @@ static int ad7292_probe(struct spi_device *spi)
>  	struct ad7292_state *st;
>  	struct iio_dev *indio_dev;
>  	struct device_node *child;
> -	bool diff_channels = 0;
> +	bool diff_channels = false;
>  	int ret;
>  
>  	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
Guoqing Chi March 22, 2021, 1:42 a.m. UTC | #3
On Sat, 20 Mar 2021 15:07:30 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> On Fri, 19 Mar 2021 14:27:06 +0800
> Guoqing chi <chi962464zy@163.com> wrote:
> 
> > From: Guoqing Chi <chiguoqing@yulong.com>
> > 
> > A bool initializer is best assigned to false rather than 0.
> > 
> > Signed-off-by: Guoqing Chi <chiguoqing@yulong.com>  
> 
> Hi
> 
> This one is a bit marginal as counting as noise rather that a useful
> change in an existing driver. I'll take it this time, but I'm not
> keen to see lots of these unless they form part of larger sets
> cleaning up the drivers in question.
> 
> Applied to the togreg branch of iio.git and pushed out as testing for
> the auto builders to ignore it.
> 
> thanks,
> 
> Jonathan

Hi Jonathan

Okay, I'll be mindful of that.
Thanks for your advice.

Thanks.

> 
> > ---
> >  drivers/iio/adc/ad7292.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/adc/ad7292.c b/drivers/iio/adc/ad7292.c
> > index 70e33dd1c9f7..3271a31afde1 100644
> > --- a/drivers/iio/adc/ad7292.c
> > +++ b/drivers/iio/adc/ad7292.c
> > @@ -260,7 +260,7 @@ static int ad7292_probe(struct spi_device *spi)
> >  	struct ad7292_state *st;
> >  	struct iio_dev *indio_dev;
> >  	struct device_node *child;
> > -	bool diff_channels = 0;
> > +	bool diff_channels = false;
> >  	int ret;
> >  
> >  	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
> >
diff mbox series

Patch

diff --git a/drivers/iio/adc/ad7292.c b/drivers/iio/adc/ad7292.c
index 70e33dd1c9f7..3271a31afde1 100644
--- a/drivers/iio/adc/ad7292.c
+++ b/drivers/iio/adc/ad7292.c
@@ -260,7 +260,7 @@  static int ad7292_probe(struct spi_device *spi)
 	struct ad7292_state *st;
 	struct iio_dev *indio_dev;
 	struct device_node *child;
-	bool diff_channels = 0;
+	bool diff_channels = false;
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));