linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: adc: ad7292: Modify the bool initialization assignment
@ 2021-03-19  6:27 Guoqing chi
  2021-03-20 14:21 ` Marcelo Schmitt
  2021-03-20 15:07 ` Jonathan Cameron
  0 siblings, 2 replies; 4+ messages in thread
From: Guoqing chi @ 2021-03-19  6:27 UTC (permalink / raw)
  To: jic23
  Cc: linux-iio, linux-kernel, lars, Michael.Hennerich,
	marcelo.schmitt1, pmeerw, chiguoqing

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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: adc: ad7292: Modify the bool initialization assignment
  2021-03-19  6:27 [PATCH] iio: adc: ad7292: Modify the bool initialization assignment Guoqing chi
@ 2021-03-20 14:21 ` Marcelo Schmitt
  2021-03-20 15:07 ` Jonathan Cameron
  1 sibling, 0 replies; 4+ messages in thread
From: Marcelo Schmitt @ 2021-03-20 14:21 UTC (permalink / raw)
  To: Guoqing chi
  Cc: jic23, linux-iio, linux-kernel, lars, Michael.Hennerich, pmeerw,
	chiguoqing

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
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: adc: ad7292: Modify the bool initialization assignment
  2021-03-19  6:27 [PATCH] iio: adc: ad7292: Modify the bool initialization assignment Guoqing chi
  2021-03-20 14:21 ` Marcelo Schmitt
@ 2021-03-20 15:07 ` Jonathan Cameron
  2021-03-22  1:42   ` Guoqing Chi
  1 sibling, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2021-03-20 15:07 UTC (permalink / raw)
  To: Guoqing chi
  Cc: linux-iio, linux-kernel, lars, Michael.Hennerich,
	marcelo.schmitt1, pmeerw, chiguoqing

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));


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: adc: ad7292: Modify the bool initialization assignment
  2021-03-20 15:07 ` Jonathan Cameron
@ 2021-03-22  1:42   ` Guoqing Chi
  0 siblings, 0 replies; 4+ messages in thread
From: Guoqing Chi @ 2021-03-22  1:42 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, linux-kernel, lars, Michael.Hennerich,
	marcelo.schmitt1, pmeerw, chiguoqing

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));
> >  


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-22  1:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  6:27 [PATCH] iio: adc: ad7292: Modify the bool initialization assignment Guoqing chi
2021-03-20 14:21 ` Marcelo Schmitt
2021-03-20 15:07 ` Jonathan Cameron
2021-03-22  1:42   ` Guoqing Chi

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).