Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5297927yba; Wed, 8 May 2019 10:53:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsgFgPH+xGui2iKkeccACy3dWJRisWF/oKShHtPLP6fNd8Rg/35YbFP2AJxD4giEmp1WvA X-Received: by 2002:aa7:8dc7:: with SMTP id j7mr49954326pfr.82.1557338035291; Wed, 08 May 2019 10:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557338035; cv=none; d=google.com; s=arc-20160816; b=SuB9f1422R9gcRCl5b1hCt6ZbD95a9hh74QYOrWdzWoX9o5mLVIsJS1/04p1WJ7Vrd oaZ5nPzLv8LzNtFGuEqSeR4hoa0JhTUS2esVzivUKfC1ZNr9Z2jlYAH8SszYOpap6bZK trC7Slq1U58NqmfSH1VTSA7520rmBcFv4cH1uxp8IewrwBeDZHCDAp2F0OTSsUP9Kazi htmq5vyYUM9fa+5spRGyHDlVba1tOxWP+C57x5gOcNgM83h9tLQ1t8r5nyzWEXHMwPjO HvsKDhDuV1fUrQj1/zk1y9OuzIaYwMsW3wQwYwwWtkj+aqjiTg5qecZ60mL4oHRXvmUa EN7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date; bh=uGefUHtXF8mjRotxSqcgvoBoTAPNFegONj4UEY5RCFM=; b=dNsaxyijvxBuzLnt3osl0guol5W6EWRyxJIR8/O3G9AApbHtb7uSpAV2aGMwx/sA/Z 6XqcR47wMS3LrEc+75XZ2HFVS4q9uGlbSFgqefwtgxWuO45URBQVOa9Zk7cllOlxGD+Z c9SLQwAR9tx3A9u5qs0QnAuvAtTiL6dJ3H2nFuz1seyhA4km1PH8Acwg4iIAy3CzRiFJ ZzpOOrl4wQFUWm55+kBAbNrBC3woWkJtIxeuafq8HMUsr+4paIu7ieDaXuCHiwEwrzcZ SanUixFmmEVLxsFb44adUvZQcLO1Wu88XyNU4lJ6DqVPoH7Px4byGt7fPk6hRRD9RP5O Q1dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 74si22450409pgb.203.2019.05.08.10.53.39; Wed, 08 May 2019 10:53:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728450AbfEHQti (ORCPT + 99 others); Wed, 8 May 2019 12:49:38 -0400 Received: from gateway24.websitewelcome.com ([192.185.51.209]:14153 "EHLO gateway24.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728093AbfEHQth (ORCPT ); Wed, 8 May 2019 12:49:37 -0400 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 4F407684AA2 for ; Wed, 8 May 2019 11:49:36 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id OPlAhVyyC4FKpOPlAhv8OL; Wed, 08 May 2019 11:49:36 -0500 X-Authority-Reason: nr=8 Received: from [189.250.119.7] (port=40004 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1hOPl9-00452E-AK; Wed, 08 May 2019 11:49:35 -0500 Date: Wed, 8 May 2019 11:49:34 -0500 From: "Gustavo A. R. Silva" To: "Lee, Chun-Yi" , Darren Hart , Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , Kees Cook Subject: [PATCH] platform/x86: acer-wmi: Mark expected switch fall-throughs Message-ID: <20190508164934.GA20064@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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.119.7 X-Source-L: No X-Exim-ID: 1hOPl9-00452E-AK X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.119.7]:40004 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 5 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/platform/x86/acer-wmi.c: In function ‘set_u32’: drivers/platform/x86/acer-wmi.c:1378:33: warning: this statement may fall through [-Wimplicit-fallthrough=] if (cap == ACER_CAP_WIRELESS || ^ drivers/platform/x86/acer-wmi.c:1386:3: note: here case ACER_WMID: ^~~~ drivers/platform/x86/acer-wmi.c:1393:12: warning: this statement may fall through [-Wimplicit-fallthrough=] else if (wmi_has_guid(WMID_GUID2)) ^ drivers/platform/x86/acer-wmi.c:1395:3: note: here default: ^~~~~~~ drivers/platform/x86/acer-wmi.c: In function ‘get_u32’: drivers/platform/x86/acer-wmi.c:1340:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (cap == ACER_CAP_MAILLED) { ^ drivers/platform/x86/acer-wmi.c:1344:2: note: here case ACER_WMID: ^~~~ drivers/platform/x86/acer-wmi.c: In function ‘WMID_get_u32’: drivers/platform/x86/acer-wmi.c:1013:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (quirks->mailled == 1) { ^ drivers/platform/x86/acer-wmi.c:1018:2: note: here default: ^~~~~~~ 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 --- drivers/platform/x86/acer-wmi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index fcfeadd1301f..bd87f9037f95 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1015,6 +1015,7 @@ static acpi_status WMID_get_u32(u32 *value, u32 cap) *value = tmp & 0x1; return 0; } + /* fall through */ default: return AE_ERROR; } @@ -1341,6 +1342,7 @@ static acpi_status get_u32(u32 *value, u32 cap) status = AMW0_get_u32(value, cap); break; } + /* fall through */ case ACER_WMID: status = WMID_get_u32(value, cap); break; @@ -1383,6 +1385,7 @@ static acpi_status set_u32(u32 value, u32 cap) return AMW0_set_u32(value, cap); } + /* fall through */ case ACER_WMID: return WMID_set_u32(value, cap); case ACER_WMID_v2: @@ -1392,6 +1395,7 @@ static acpi_status set_u32(u32 value, u32 cap) return wmid_v2_set_u32(value, cap); else if (wmi_has_guid(WMID_GUID2)) return WMID_set_u32(value, cap); + /* fall through */ default: return AE_BAD_PARAMETER; } -- 2.21.0