lkml.org 
[lkml]   [2019]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] iio: cros_ec_accel_legacy: Mark expected switch fall-throughs
From
Date


On 2/20/19 7:23 PM, Kees Cook wrote:
> On Wed, Feb 20, 2019 at 10:47 AM Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>> Yeah. Actually, we can even take the switch and for out of the equation,
>> and the code can be rewritten as follows:
>>
>> ec_accel_channels[X].scan_index = Y;
>> ec_accel_channels[Y].scan_index = X;
>> ec_accel_channels[Z].scan_index = Z;
>>
>> if (state->sensor_num == MOTIONSENSE_LOC_LID)
>> state->sign[X] = state->sign[Z] = -1;
>> else
>> state->sign[X] = state->sign[Y] = state->sign[Z] = 1;
>
> Actually, should be an unconditional "state->sign[Y] = 1", but

You're right. Team work!

> otherwise, yes. Can you send that patch?
>

Sure thing.

>
>>> Agreed, it's 'novel'. Waiting for Gwendal or someone else to come
>>> back and check it wasn't meant to be doing something else.
>>
>> We've been waiting 5 months for Gwendal. :/
>
> I've looked at this enough. I'm happy to Ack it, if that helps. :)
>

Awesome. :)

Thanks
--
Gustavo

\
 
 \ /
  Last update: 2019-02-21 02:49    [W:0.118 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site