From patchwork Thu Oct 12 18:49:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 10002565 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9FC55602BF for ; Thu, 12 Oct 2017 19:10:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9235828E7A for ; Thu, 12 Oct 2017 19:10:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 869AD28E8B; Thu, 12 Oct 2017 19:10:00 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 CFE4228E7A for ; Thu, 12 Oct 2017 19:09:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751348AbdJLTJ5 (ORCPT ); Thu, 12 Oct 2017 15:09:57 -0400 Received: from gateway31.websitewelcome.com ([192.185.144.29]:14061 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373AbdJLTJ4 (ORCPT ); Thu, 12 Oct 2017 15:09:56 -0400 X-Greylist: delayed 1235 seconds by postgrey-1.27 at vger.kernel.org; Thu, 12 Oct 2017 15:09:56 EDT Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway31.websitewelcome.com (Postfix) with ESMTP id C172610E18 for ; Thu, 12 Oct 2017 13:49:20 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id 2iXoeiPo6DL8r2iXoebPTd; Thu, 12 Oct 2017 13:49:20 -0500 Received: from [189.175.13.173] (port=59824 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1e2iXo-001Hob-Fo; Thu, 12 Oct 2017 13:49:20 -0500 Date: Thu, 12 Oct 2017 13:49:18 -0500 From: "Gustavo A. R. Silva" To: "Rafael J. Wysocki" , Len Brown Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] ACPI: mark expected switch fall-throughs Message-ID: <20171012184918.GA17821@embeddedor.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) 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.175.13.173 X-Exim-ID: 1e2iXo-001Hob-Fo X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.175.13.173]:59824 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 3 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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. Signed-off-by: Gustavo A. R. Silva --- This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of the code is to fall through. drivers/acpi/ac.c | 1 + drivers/acpi/acpi_processor.c | 1 + drivers/acpi/dock.c | 1 + drivers/acpi/resource.c | 1 + 4 files changed, 4 insertions(+) diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 8f52483..47a7ed5 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -265,6 +265,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event) default: ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unsupported event [0x%x]\n", event)); + /* fall through */ case ACPI_AC_NOTIFY_STATUS: case ACPI_NOTIFY_BUS_CHECK: case ACPI_NOTIFY_DEVICE_CHECK: diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 86c1059..449d86d 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -82,6 +82,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev) * PIIX4 models. */ errata.piix4.throttle = 1; + /* fall through*/ case 2: /* PIIX4E */ case 3: /* PIIX4M */ diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 2305e1a..e3fc1f0 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -482,6 +482,7 @@ int dock_notify(struct acpi_device *adev, u32 event) surprise_removal = 1; event = ACPI_NOTIFY_EJECT_REQUEST; /* Fall back */ + /* fall through */ case ACPI_NOTIFY_EJECT_REQUEST: begin_undock(ds); if ((immediate_undock && !(ds->flags & DOCK_IS_ATA)) diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index d85e010..316a0fc 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -381,6 +381,7 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity) case ACPI_ACTIVE_BOTH: if (triggering == ACPI_EDGE_SENSITIVE) return IRQ_TYPE_EDGE_BOTH; + /* fall through */ default: return IRQ_TYPE_NONE; }