Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1370817ybi; Fri, 2 Aug 2019 14:21:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyidAELvnNKYeZ34OPlkqWvX5PEIkq28mGfJtrCrx89sxvh7ZYNol62Q2Syy1+1OymA4xLp X-Received: by 2002:a63:f807:: with SMTP id n7mr130041405pgh.119.1564780883545; Fri, 02 Aug 2019 14:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564780883; cv=none; d=google.com; s=arc-20160816; b=pT0qlncrev1ovs6IVnQhTIS3y7KzYK/dMnf9nXJYGZ73ncWphqq1Xa/OWDftLs4dyT ldm3yZW+/1CKFB+/lESJba6S2sP4/DWlgHDEr0mk2ZvY+iAwJSL0bSOlIoU57mefJP2U P5CRQaBNiO+rdE+aRdwQYW/ewGjIHT21PiNtxvqPzC8xrq/l6/BTVb7w8ZN4imRY+GBg IhzheGa5IpMxMq/4OEOc7Hv+5EFizxFmjy7DnlG48rEiZ+7ISjtwReheU1aymjqETyi+ 7V3Erel2UJZAA+/NYGz9A0X1bxbHfQov6dHhBhMdL+HYMT9/2ygZTZzs1zAewuO8iz0s EMeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4RGTSUe7TxPxdmZlGX/0AwX2RkTcBetGQRFQt2FcrgY=; b=CB3ELuSmwWNBrHqF+KstYog1iRm+TeymywLAS7I4BJOHffwMhDP5uN8TuqmVueT9Ut KMK3HL2h8izSonW7gh1OFsVLD46ruwkt4A2TlKKc7r6o9lpW4Uteu4CaRmiUfWnu+AbU n7vd7hiK4dHmj6PuiWRd8XvdZD07VnW6fqWM6I7GJETUwq0wczJ+bwGjWhqiL8hR7tXg r/wOZcz5D27QMi+B9AQyhuB4CK13q3nOWZzON6EJMjfUcxA49l+lxv7qW1yzfJBdMb5g Yb1zP469avBaFI7MZwQSrtBUnD/AxNHPuR/0kfXF5ZU0FE0wulkM6R3mLjHu1rTXZiir 6VgQ== 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 21si14725494pgk.492.2019.08.02.14.21.07; Fri, 02 Aug 2019 14:21:23 -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 S1730849AbfHBLC3 (ORCPT + 99 others); Fri, 2 Aug 2019 07:02:29 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:35463 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729311AbfHBLC2 (ORCPT ); Fri, 2 Aug 2019 07:02:28 -0400 Received: from cpe-2606-a000-111b-6140-0-0-0-162e.dyn6.twc.com ([2606:a000:111b:6140::162e] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1htVJ9-0008J6-Js; Fri, 02 Aug 2019 07:01:19 -0400 Date: Fri, 2 Aug 2019 07:00:42 -0400 From: Neil Horman To: Miguel Ojeda Cc: "H. Peter Anvin" , Peter Zijlstra , Joe Perches , Pavel Machek , Linus Torvalds , Kees Cook , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "Gustavo A . R . Silva" , Arnaldo Carvalho de Melo , Kan Liang , Namhyung Kim , Jiri Olsa , Alexander Shishkin , Shawn Landden , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , linux-kernel Subject: Re: [RFC PATCH] compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use Message-ID: <20190802110042.GA6957@hmswarspite.think-freely.org> References: <20190731171429.GA24222@amd> <765E740C-4259-4835-A58D-432006628BAC@zytor.com> <20190731184832.GZ31381@hirez.programming.kicks-ass.net> <20190801122429.GY31398@hirez.programming.kicks-ass.net> <0BCDEED9-0B72-4412-909F-76C20D54983E@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Score: -2.9 (--) X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 01, 2019 at 10:26:29PM +0200, Miguel Ojeda wrote: > On Thu, Aug 1, 2019 at 10:10 PM wrote: > > > > I'm not disagreeing... I think using a macro makes sense. > > It is either a macro or waiting for 5+ years (while we keep using the > comment style) :-) > > In case it helps to make one's mind about whether to go for it or not, > I summarized the advantages and a few other details in the patch I > sent in October: > > https://github.com/ojeda/linux/commit/668f011a2706ea555987e263f609a5deba9c7fc4 > > It would be nice, however, to discuss whether we want __fallthrough or > fallthrough. The former is consistent with the rest of compiler > attributes and makes it clear it is not a keyword, the latter is > consistent with "break", "goto" and "return", as Joe's patch explains. > I was having this conversation with Joe, and I agree, I like the idea of macroing up the fall through attribute, but naming it __fallthrough seems more consistent to me with the other attribute macros. I also feel like its more recognizable as a macro. Naming it fallthrough just makes it look like someone forgot to put /**/'s around it to me. Neil > Cheers, > Miguel >