Skip to contentSkip to conversation

staging: iio: remove unnecessary parentheses

PATCH In review Ji-Hun Kim 2 participants 2 messages Dec 28, 2017 – Dec 29, 2017

Subsystems (4)
lore
Share & tools
lore

Ji-Hun Kim

author
#0 lore raw

PATCH 1/2 staging: iio: remove unnecessary parentheses

Clean up checkpatch warning:
CHECK: Unnecessary parentheses around 'st->devid != ID_AD7195'

---
 drivers/staging/iio/adc/ad7192.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7192.c +1 -1
index cadfb96..f015955 100644
@@ -271,7 +271,7 @@ static int ad7192_setup(struct ad7192_state *st,
 	if (pdata->sinc3_en)
 		st->mode |= AD7192_MODE_SINC3;
 
-	if (pdata->refin2_en && (st->devid != ID_AD7195))
+	if (pdata->refin2_en && st->devid != ID_AD7195)
 		st->conf |= AD7192_CONF_REFSEL;
 
 	if (pdata->chop_en) {
Signature · 1 line
2.10.1 (Apple Git-78)
maintainer
#1 lore raw
Quoted 4 lines · On Wed, 27 Dec 2017 18:47:18 -0800 Ji-Hun Kim <[email protected]> wrote:

Clean up checkpatch warning:
CHECK: Unnecessary parentheses around 'st->devid != ID_AD7195'

I've personally never really cared about this particular one as removing the brackets doesn't make the code easier to read.

However, it is worthwhile to suppress checkpatch warnings so we can see the ones that matter.

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

Thanks,

Jonathan

Quoted 17 lines
---
 drivers/staging/iio/adc/ad7192.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7192.c +1 -1
index cadfb96..f015955 100644
@@ -271,7 +271,7 @@ static int ad7192_setup(struct ad7192_state *st,
 	if (pdata->sinc3_en)
 		st->mode |= AD7192_MODE_SINC3;
 
-	if (pdata->refin2_en && (st->devid != ID_AD7195))
+	if (pdata->refin2_en && st->devid != ID_AD7195)
 		st->conf |= AD7192_CONF_REFSEL;
 
 	if (pdata->chop_en) {