iio: dpot-dac: fix code comment in dpot_dac_read_raw()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 25 Aug 2020 23:57:12 +0000 (18:57 -0500)
committerGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 26 Aug 2020 19:02:24 +0000 (14:02 -0500)
After the replacement of the /* fall through */ comment with the
fallthrough pseudo-keyword macro, the natural reading of a code
comment was broken.

Fix the natural reading of such a comment and make it intelligible.

Reported-by: Peter Rosin <peda@axentia.se>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
drivers/iio/dac/dpot-dac.c

index be61c3b01e8b1afe9555fe8f51c1ae116e4b999f..1a9609eda5c5ca047cfb32ff0be569af98c43282 100644 (file)
@@ -74,10 +74,11 @@ static int dpot_dac_read_raw(struct iio_dev *indio_dev,
                case IIO_VAL_INT:
                        /*
                         * Convert integer scale to fractional scale by
-                        * setting the denominator (val2) to one, and...
+                        * setting the denominator (val2) to one...
                         */
                        *val2 = 1;
                        ret = IIO_VAL_FRACTIONAL;
+                       /* ...and fall through. Say it again for GCC. */
                        fallthrough;
                case IIO_VAL_FRACTIONAL:
                        *val *= regulator_get_voltage(dac->vref) / 1000;