Skip to contentSkip to conversation

iio: adc: ad7292: Modify the bool initialization assignment

PATCH In review Guoqing chi 3 participants 4 messages Mar 19, 2021 – Mar 22, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: adc: ad7292: Modify the bool initialization assignment

From: Guoqing Chi <[email protected]>

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

---
 drivers/iio/adc/ad7292.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad7292.c +1 -1
index 70e33dd1c9f7..3271a31afde1 100644
@@ -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));
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Okay, looks good to me.

Quoted 26 lines · Guoqing chi

From: Guoqing Chi <[email protected]>

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

---
 drivers/iio/adc/ad7292.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad7292.c +1 -1
index 70e33dd1c9f7..3271a31afde1 100644
@@ -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));
Signature · 1 line
2.17.1
maintainer
#2 lore raw
In reply to Guoqing chi
Quoted 5 lines · On Fri, 19 Mar 2021 14:27:06 +0800 Guoqing chi <[email protected]> wrote:

From: Guoqing Chi <[email protected]>

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

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

Quoted 17 lines
---
 drivers/iio/adc/ad7292.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad7292.c +1 -1
index 70e33dd1c9f7..3271a31afde1 100644
@@ -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));
#3 lore raw
Quoted 16 lines · On Sat, 20 Mar 2021 15:07:30 +0000 Jonathan Cameron <[email protected]> wrote:
Quoted 5 lines · On Fri, 19 Mar 2021 14:27:06 +0800 Guoqing chi <[email protected]> wrote:

From: Guoqing Chi <[email protected]>

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

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.

Quoted 6 lines

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.

Quoted 19 lines
Quoted 19 lines
---
 drivers/iio/adc/ad7292.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad7292.c +1 -1
index 70e33dd1c9f7..3271a31afde1 100644
@@ -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));