Received: by 10.223.164.202 with SMTP id h10csp3763004wrb; Tue, 28 Nov 2017 17:08:29 -0800 (PST) X-Google-Smtp-Source: AGs4zMbY6/RRd2pZhBif6MdHmB3N1CU1bnt2jcnvxA4axg4W4HrSxpXa0+ueyo/GXmkXplSTfiDk X-Received: by 10.98.196.155 with SMTP id h27mr1107936pfk.137.1511917709685; Tue, 28 Nov 2017 17:08:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511917709; cv=none; d=google.com; s=arc-20160816; b=yY77xq1HJMau6Gu3wrLJUA0sgcyAbW2QhA9/+xbkZ/sS+caoCrsTE4Pn86ORZMPNXl Cba5RYDDNVS8n61NI+/8cUcW6/V7Ww2XMDmFEIS5e0ymbYsTA7YlRkJi4B/n95d+v3Gl PAiSbwXGkZjCHzCek5NNo9rbSKIiu2jM6iNFyyNIpsILZ76/WksFDZ0ahjk64dO0CxWP IfTXjLPQ+Bl60cMIHjiaVkojMJBVQCSVSa10tkrREYFIeF1hjKVG7feXvAL7mXx8kAa8 UWLLj3Ef5w0/z1E0jS0n4SkpR3lxEjKhpkUyI5sGfzjejWj/TU/0FoXlD28t+poO3yPq 4dqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=GVYYyUCrhNWfDE9vabNZiwcjT/SNosyJg7jBa/4wz44=; b=QsVBl8BiD6et7K2ufQua8deIC/OmYC64nUB1VvadnXpmJ4oO862DGr0ca2IXA9Scfs HX+QhzFa/nR+sMtuIuk9yT/eoxbgYQO9kIPrUL4uSuVIK5kLTHLWjvMHZ/rpYMSlCUXR VmqIp5ZAuak1LDyb4OLpfHBO0RlDJRMNlCTRxgg2gWHiW6sA2ccmvr3M9SzlmoORfBNT hl9z3Jp4B/QE+Kh3KXUdeftjHFwI7Ew+oUie+vhDNxh1+w4ZT6SoDy4mBi1hYEEYSEyo yTJXqZVsApW5iDk47nHSIwSDluKUoUoSbMFDdhhDAUT63+YWYwO2qNYllsq3Bw/3a2pW SkdA== 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 b91si330285plb.662.2017.11.28.17.08.18; Tue, 28 Nov 2017 17:08:29 -0800 (PST) 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 S1752364AbdK2BHm (ORCPT + 70 others); Tue, 28 Nov 2017 20:07:42 -0500 Received: from smtprelay0040.hostedemail.com ([216.40.44.40]:53347 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751497AbdK2BHk (ORCPT ); Tue, 28 Nov 2017 20:07:40 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id B9D6EAC0C; Wed, 29 Nov 2017 01:07:39 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:4605:5007:10004:10400:10848:11232:11658:11914:12043:12740:12760:12895:13069:13160:13229:13311:13357:13439:14096:14097:14181:14659:14721:21063:21080:21212:21451:21627:30041:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: cow61_5fc9ddaf8e62a X-Filterd-Recvd-Size: 2905 Received: from XPS-9350 (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Wed, 29 Nov 2017 01:07:38 +0000 (UTC) Message-ID: <1511917656.19952.52.camel@perches.com> Subject: Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs From: Joe Perches To: "Gustavo A. R. Silva" , Linus Torvalds Cc: Alan Cox , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , LKML , Kees Cook Date: Tue, 28 Nov 2017 17:07:36 -0800 In-Reply-To: <20171128143714.Horde.2uPOfQfKWjP7aGfH2w0lflN@gator4166.hostgator.com> References: <20171127235253.GA20384@embeddedor.com> <20171128120512.Horde.1mz61Up1PsNtyHbrjWmK8L7@gator4166.hostgator.com> <20171128122235.Horde.vFP-9ZfAP0f9BFNePB8Z8xi@gator4166.hostgator.com> <20171128190032.2b1fa464@alans-desktop> <20171128143714.Horde.2uPOfQfKWjP7aGfH2w0lflN@gator4166.hostgator.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-11-28 at 14:37 -0600, Gustavo A. R. Silva wrote: > Quoting Linus Torvalds : > > > On Tue, Nov 28, 2017 at 11:00 AM, Alan Cox > > wrote: > > > > > > The notation in question has been standard in tools like lint since the > > > end of the 1970s > > > > Yes. > > > > That said, maybe one option would be to annotate the "case:" and > > "default:" statements if that makes people happier. > > > > IOW, we could do something like > > > > #define fallthrough __atttibute__((fallthrough)) > > > > and then write > > > > fallthrough case 1: > > ... > > > > which while absolutely not traditional, might look and read a bit more > > logical to people. I mean, it literally _is_ a "fallthrough case", so > > it makes semantic sense. > > > > This is elegant. The thing is that this makes it appear as if there is > an unconditional fall through. > > It is not uncommon to have multiple break statements in the same case > block and to fall through also. My preferred syntax would be to use __fallthrough or fallthrough in the same manner as break; switch (foo) { case bar: bar(); fallthrough; case baz: baz(); break; default; qux(); exit(1); } From 1585346717362488393@xxx Tue Nov 28 21:27:26 +0000 2017 X-GM-THRID: 1585265423856272058 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread