Re: [GIT PULL] fallthrough pseudo-keyword macro conversions for 5.9-rc3

From: Peter Rosin
Date: Tue Aug 25 2020 - 19:36:35 EST


On 2020-08-23 22:48, Gustavo A. R. Silva wrote:
> Hi Linus,
>
> Please, pull the following tree-wide patch that replaces tons (2484) of
> /* fall through */ comments, and its variants, with the new pseudo-keyword
> macro fallthrough[1]. Also, remove unnecessary fall-through markings when
> it is the case.

Hi.

This is the second time [1] you have messed up the reading pleasure of
drivers/iio/dac/dpot-dac.c with mindless fall through conversions.
The comments in that file no longer make sense.

With more context:

case IIO_VAL_INT:
/*
* Convert integer scale to fractional scale by
* setting the denominator (val2) to one, and...
*/
*val2 = 1;
ret = IIO_VAL_FRACTIONAL;
- /* fall through */
+ fallthrough;
case IIO_VAL_FRACTIONAL:
*val *= regulator_get_voltage(dac->vref) / 1000;
*val2 *= dac->max_ohms;
break;
}

See how the comment ending with "and..." is no longer continued? I
disliked the last change to this file [2] that (after pressure) moved
"and" from the original "...and fall through." comment away from where
it belonged (instead of just removing it) exactly because it was less
clear that the "fall through" was part of the natural comment reading.
But this latest patch just destroys the commentary completely.

I guess I should have stood my ground the last time with my

/* ...and fall through. Say it again for GCC. */
/* fall through */

suggestion, so that it would now have become

/* ...and fall through. Say it again for GCC. */
fallthrough;

with this latest change. Because that makes sense.

If it was someone else, it would be understandable, but since it was
you - again - I expect a patch fixing this. Either as I suggested above
or some other way.

Comments are important.

Cheers,
Peter

[1] https://lore.kernel.org/lkml/20181008173528.GA31787@xxxxxxxxxxxxxx/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/iio/dac/dpot-dac.c?id=c65a0d84ee9c