From: Gustavo A. R. Silva Date: Wed, 3 Oct 2018 15:55:22 +0000 (+0200) Subject: spi: pxa2xx: Rewrite switch code block in interrupt_transfer X-Git-Tag: v5.15~7532^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c1833767bd8d906489a91cbbcb151fe3b818b61;p=platform%2Fkernel%2Flinux-starfive.git spi: pxa2xx: Rewrite switch code block in interrupt_transfer Rewrite switch code block to directly do the expected number of shifts in each case and have break statements. Addresses-Coverity-ID: 1056539 ("Missing break in switch") Suggested-by: Mark Brown Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index fc9aac2..d68f511 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -665,9 +665,11 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data) bytes_left = drv_data->rx_end - drv_data->rx; switch (drv_data->n_bytes) { case 4: - bytes_left >>= 1; + bytes_left >>= 2; + break; case 2: bytes_left >>= 1; + break; } rx_thre = pxa2xx_spi_get_rx_default_thre(drv_data);