Skip to contentSkip to conversation

staging: iio: cdc: remove braces from single line if blocks

PATCH Applied Alexander Vorwerk 2 participants 2 messages Aug 20, 2021 – Aug 30, 2021

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

PATCH 1/1 staging: iio: cdc: remove braces from single line if blocks

Remove braces from single line if blocks to clear checkpatch warnings.
WARNING: braces {} are not necessary for single statement blocks

---
 drivers/staging/iio/cdc/ad7746.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/iio/cdc/ad7746.c +1 -3
index 78ac720266e6..71c709771676 100644
@@ -241,10 +241,8 @@ static int ad7746_select_channel(struct iio_dev *indio_dev,
 		if (ret < 0)
 			return ret;
 
-		if (chip->capdac_set != chan->channel) {
-
+		if (chip->capdac_set != chan->channel)
 			chip->capdac_set = chan->channel;
-		}
 		break;
 	case IIO_VOLTAGE:
 	case IIO_TEMP:
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 4 lines · On Sat, 21 Aug 2021 00:49:14 +0200 Alexander Vorwerk <[email protected]> wrote:

Remove braces from single line if blocks to clear checkpatch warnings.
WARNING: braces {} are not necessary for single statement blocks

Applied. Thanks

Quoted 20 lines
---
 drivers/staging/iio/cdc/ad7746.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/iio/cdc/ad7746.c +1 -3
index 78ac720266e6..71c709771676 100644
@@ -241,10 +241,8 @@ static int ad7746_select_channel(struct iio_dev *indio_dev,
 		if (ret < 0)
 			return ret;
 
-		if (chip->capdac_set != chan->channel) {
-
+		if (chip->capdac_set != chan->channel)
 			chip->capdac_set = chan->channel;
-		}
 		break;
 	case IIO_VOLTAGE:
 	case IIO_TEMP: