From patchwork Wed Apr 10 18:49:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 10894543 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D30E17E0 for ; Wed, 10 Apr 2019 19:13:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13A6E25D99 for ; Wed, 10 Apr 2019 19:13:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 073AD28B92; Wed, 10 Apr 2019 19:13:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3A5E25D99 for ; Wed, 10 Apr 2019 19:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725782AbfDJTNA (ORCPT ); Wed, 10 Apr 2019 15:13:00 -0400 Received: from gateway32.websitewelcome.com ([192.185.144.98]:33343 "EHLO gateway32.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfDJTNA (ORCPT ); Wed, 10 Apr 2019 15:13:00 -0400 X-Greylist: delayed 1432 seconds by postgrey-1.27 at vger.kernel.org; Wed, 10 Apr 2019 15:12:59 EDT Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 8A89D9A840 for ; Wed, 10 Apr 2019 13:49:06 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id EIHShVF734FKpEIHShzgaT; Wed, 10 Apr 2019 13:49:06 -0500 X-Authority-Reason: nr=8 Received: from [189.250.139.70] (port=42402 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1hEIHR-000nKl-TJ; Wed, 10 Apr 2019 13:49:06 -0500 Date: Wed, 10 Apr 2019 13:49:05 -0500 From: "Gustavo A. R. Silva" To: Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] watchdog: machzwd: Mark expected switch fall-through Message-ID: <20190410184905.GA24283@embeddedor> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.250.139.70 X-Source-L: No X-Exim-ID: 1hEIHR-000nKl-TJ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.139.70]:42402 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 17 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/watchdog/machzwd.c: In function ‘zf_set_timer’: ./arch/x86/include/asm/io.h:355:14: warning: this statement may fall through [-Wimplicit-fallthrough=] #define outw outw drivers/watchdog/machzwd.c:80:53: note: in expansion of macro ‘outw’ #define zf_writew(port, data) { outb(port, INDEX); outw(data, DATA_W); } ^~~~ drivers/watchdog/machzwd.c:179:3: note: in expansion of macro ‘zf_writew’ zf_writew(COUNTER_1, new); ^~~~~~~~~ drivers/watchdog/machzwd.c:180:2: note: here case WD2: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck --- drivers/watchdog/machzwd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c index 88d823d87a4b..108928dbc754 100644 --- a/drivers/watchdog/machzwd.c +++ b/drivers/watchdog/machzwd.c @@ -177,6 +177,7 @@ static inline void zf_set_timer(unsigned short new, unsigned char n) switch (n) { case WD1: zf_writew(COUNTER_1, new); + /* fall through */ case WD2: zf_writeb(COUNTER_2, new > 0xff ? 0xff : new); default: