Skip to contentSkip to conversation

iio: dpot-dac: fix code comment in dpot_dac_read_raw()

PATCH In review Gustavo A. R. Silva 4 participants 6 messages Aug 26, 2020 – Aug 29, 2020

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

PATCH 1/1 iio: dpot-dac: fix code comment in dpot_dac_read_raw()

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.

---
 drivers/iio/dac/dpot-dac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/dac/dpot-dac.c +2 -1
index be61c3b01e8b..1a9609eda5c5 100644
@@ -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;
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw

Hi!

Quoted 8 lines · Gustavo A. R. Silva

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.

Excellent, thanks for the quick turnaround!

And just to be explicit, this fix is for 5.9.

Cheers,
Peter

#2 lore raw

Hi,

Quoted 7 lines · Peter Rosin

Hi!

Quoted 4 lines · Gustavo A. R. Silva

After the replacement of the /* fall through */ comment with the fallthrough pseudo-keyword macro, the natural reading of a code comment was broken.

Quoted 7 lines
Quoted 4 lines

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

Excellent, thanks for the quick turnaround!

No problem. :)

Quoted 4 lines

And just to be explicit, this fix is for 5.9.

If you don't mind I can add this to my tree for 5.9-rc4 and send it directly to Linus.

Thanks
--
Gustavo

#3 lore raw
Quoted 7 lines · Gustavo A. R. Silva
Quoted 4 lines

And just to be explicit, this fix is for 5.9.

If you don't mind I can add this to my tree for 5.9-rc4 and send it directly to Linus.

Fine by me, Jonathan might think differently but I can't find a reason why. Just about nothing is happening in that file and the risk for conflicts is negligible.

Cheers,
Peter

#4 lore raw
Quoted 6 lines · Peter Rosin
Quoted 5 lines · Gustavo A. R. Silva
Quoted 4 lines

And just to be explicit, this fix is for 5.9.

Quoted 7 lines
Quoted 2 lines

If you don't mind I can add this to my tree for 5.9-rc4 and send it directly to Linus.

Fine by me, Jonathan might think differently but I can't find a reason why. Just about nothing is happening in that file and the risk for conflicts is negligible.

OK. In the meantime, I have added this to my -next tree and queued it up for 5.9-rc3.

Thanks
--
Gustavo

maintainer
#5 lore raw
Quoted 10 lines · On Wed, 26 Aug 2020 14:25:29 -0500 "Gustavo A. R. Silva"…
Quoted 9 lines · Peter Rosin
Quoted 7 lines · Gustavo A. R. Silva
Quoted 4 lines

And just to be explicit, this fix is for 5.9.

If you don't mind I can add this to my tree for 5.9-rc4 and send it directly to Linus.

Quoted 7 lines
Quoted 4 lines

Fine by me, Jonathan might think differently but I can't find a reason why. Just about nothing is happening in that file and the risk for conflicts is negligible.

OK. In the meantime, I have added this to my -next tree and queued it up for 5.9-rc3.

Absolutely fine by me.

Thanks,

Jonathan

Quoted 4 lines

Thanks
--
Gustavo