Re: [PATCH] spi: pxa2xx: Mark expected switch fall-through

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux