* [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()
@ 2020-08-26 0:08 Gustavo A. R. Silva
2020-08-26 7:04 ` Peter Rosin
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2020-08-26 0:08 UTC (permalink / raw)
To: Peter Rosin, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler
Cc: linux-iio, linux-kernel, 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.
Reported-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
drivers/iio/dac/dpot-dac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/dac/dpot-dac.c b/drivers/iio/dac/dpot-dac.c
index be61c3b01e8b..1a9609eda5c5 100644
--- a/drivers/iio/dac/dpot-dac.c
+++ b/drivers/iio/dac/dpot-dac.c
@@ -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;
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()
2020-08-26 0:08 [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw() Gustavo A. R. Silva
@ 2020-08-26 7:04 ` Peter Rosin
2020-08-26 14:17 ` Gustavo A. R. Silva
0 siblings, 1 reply; 6+ messages in thread
From: Peter Rosin @ 2020-08-26 7:04 UTC (permalink / raw)
To: Gustavo A. R. Silva, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler
Cc: linux-iio, linux-kernel
Hi!
On 2020-08-26 02:08, Gustavo A. R. Silva wrote:
> 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>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Excellent, thanks for the quick turnaround!
And just to be explicit, this fix is for 5.9.
Acked-by: Peter Rosin <peda@axentia.se>
Cheers,
Peter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()
2020-08-26 14:17 ` Gustavo A. R. Silva
@ 2020-08-26 14:16 ` Peter Rosin
2020-08-26 19:25 ` Gustavo A. R. Silva
0 siblings, 1 reply; 6+ messages in thread
From: Peter Rosin @ 2020-08-26 14:16 UTC (permalink / raw)
To: Gustavo A. R. Silva, Gustavo A. R. Silva, Jonathan Cameron,
Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler
Cc: linux-iio, linux-kernel
On 2020-08-26 16:17, Gustavo A. R. Silva wrote:
>> And just to be explicit, this fix is for 5.9.
>>
>> Acked-by: Peter Rosin <peda@axentia.se>
>>
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()
2020-08-26 7:04 ` Peter Rosin
@ 2020-08-26 14:17 ` Gustavo A. R. Silva
2020-08-26 14:16 ` Peter Rosin
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2020-08-26 14:17 UTC (permalink / raw)
To: Peter Rosin, Gustavo A. R. Silva, Jonathan Cameron,
Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler
Cc: linux-iio, linux-kernel
Hi,
On 8/26/20 02:04, Peter Rosin wrote:
> Hi!
>
> On 2020-08-26 02:08, Gustavo A. R. Silva wrote:
>> 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>
>> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
>
> Excellent, thanks for the quick turnaround!
>
No problem. :)
> And just to be explicit, this fix is for 5.9.
>
> Acked-by: Peter Rosin <peda@axentia.se>
>
If you don't mind I can add this to my tree for 5.9-rc4
and send it directly to Linus.
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()
2020-08-26 14:16 ` Peter Rosin
@ 2020-08-26 19:25 ` Gustavo A. R. Silva
2020-08-29 15:52 ` Jonathan Cameron
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2020-08-26 19:25 UTC (permalink / raw)
To: Peter Rosin
Cc: Gustavo A. R. Silva, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
linux-kernel
On Wed, Aug 26, 2020 at 04:16:23PM +0200, Peter Rosin wrote:
> On 2020-08-26 16:17, Gustavo A. R. Silva wrote:
> >> And just to be explicit, this fix is for 5.9.
> >>
> >> Acked-by: Peter Rosin <peda@axentia.se>
> >>
> >
> > 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()
2020-08-26 19:25 ` Gustavo A. R. Silva
@ 2020-08-29 15:52 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2020-08-29 15:52 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Peter Rosin, Gustavo A. R. Silva, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
linux-kernel
On Wed, 26 Aug 2020 14:25:29 -0500
"Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:
> On Wed, Aug 26, 2020 at 04:16:23PM +0200, Peter Rosin wrote:
> > On 2020-08-26 16:17, Gustavo A. R. Silva wrote:
> > >> And just to be explicit, this fix is for 5.9.
> > >>
> > >> Acked-by: Peter Rosin <peda@axentia.se>
> > >>
> > >
> > > 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.
Absolutely fine by me.
Thanks,
Jonathan
>
> Thanks
> --
> Gustavo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-08-29 15:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 0:08 [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw() Gustavo A. R. Silva
2020-08-26 7:04 ` Peter Rosin
2020-08-26 14:17 ` Gustavo A. R. Silva
2020-08-26 14:16 ` Peter Rosin
2020-08-26 19:25 ` Gustavo A. R. Silva
2020-08-29 15:52 ` Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.