lkml.org 
[lkml]   [2018]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] spi: pxa2xx: Mark expected switch fall-through
From
Date


On 10/3/18 5:22 PM, Mark Brown wrote:
> On Wed, Oct 03, 2018 at 02:12:11PM +0200, Gustavo A. R. Silva wrote:
>
>> switch (drv_data->n_bytes) {
>> case 4:
>> bytes_left >>= 1;
>> + /* Fall through */
>> case 2:
>> bytes_left >>= 1;
>> }
>
> I think this code is just being too cute and it'd be better to just
> rewrite it to directly do the expected number of shifts directly in each
> case and have break statements; your fix is good but still not ideal for
> readability I think.
>

Okay. I agree. I'll rewrite and send v2.

Thanks
--
Gustavo

\
 
 \ /
  Last update: 2018-10-03 17:51    [W:0.037 / U:1.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site