From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Gustavo A. R. Silva" Subject: [PATCH] can: mcp251x: fix fall-through annotation Date: Mon, 3 Sep 2018 13:25:41 -0500 Message-ID: <20180903182541.GA3956@embeddedor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" To: Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" Return-path: Received: from gateway21.websitewelcome.com ([192.185.45.163]:31609 "EHLO gateway21.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727327AbeICWrd (ORCPT ); Mon, 3 Sep 2018 18:47:33 -0400 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 3DD56400CB9B0 for ; Mon, 3 Sep 2018 13:26:09 -0500 (CDT) Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: Properly place the "fall through" annotation at the bottom of the case, which is what GCC is expecting to find. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Addresses-Coverity-ID: 114880 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/net/can/spi/mcp251x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c index e908176..17257c7 100644 --- a/drivers/net/can/spi/mcp251x.c +++ b/drivers/net/can/spi/mcp251x.c @@ -875,7 +875,8 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id) if (new_state >= CAN_STATE_ERROR_WARNING && new_state <= CAN_STATE_BUS_OFF) priv->can.can_stats.error_warning++; - case CAN_STATE_ERROR_WARNING: /* fallthrough */ + /* fall through */ + case CAN_STATE_ERROR_WARNING: if (new_state >= CAN_STATE_ERROR_PASSIVE && new_state <= CAN_STATE_BUS_OFF) priv->can.can_stats.error_passive++; -- 2.7.4