Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751840AbdLDPUz (ORCPT ); Mon, 4 Dec 2017 10:20:55 -0500 Received: from gateway20.websitewelcome.com ([192.185.50.28]:19537 "EHLO gateway20.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750961AbdLDPUr (ORCPT ); Mon, 4 Dec 2017 10:20:47 -0500 Date: Mon, 04 Dec 2017 09:20:45 -0600 Message-ID: <20171204092045.Horde.5M1LmPnqkpe4as2CWf9PPSh@gator4166.hostgator.com> From: "Gustavo A. R. Silva" To: Joonas Lahtinen Cc: Jani Nikula , Rodrigo Vivi , David Airlie , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Kees Cook Subject: Re: [PATCH] drm/i915: Mark expected switch fall-throughs References: <20171127221701.GA15983@embeddedor.com> <1512383705.4394.18.camel@linux.intel.com> In-Reply-To: <1512383705.4394.18.camel@linux.intel.com> User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline 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: 108.167.133.22 X-Source-L: Yes X-Exim-ID: 1eLsY1-001oEw-Ho X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: gator4166.hostgator.com [108.167.133.22]:52289 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 2 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 805 Lines: 32 Hi Joonas, Quoting Joonas Lahtinen : > On Mon, 2017-11-27 at 16:17 -0600, Gustavo A. R. Silva wrote: >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. > > I have to say I'm totally not sold on regexps matching comment > contents. Was something more explicit ever considered? Like: > > #define FALLTHROUGH __attribute__((fallthrough)); > > With the appropriate version checks, of course. > One of the arguments is that comments lets us leverage the existing static analyzers. We've been discussing this during the last week, feel free to join the discussion: http://www.spinics.net/lists/kernel/msg2659908.html http://www.spinics.net/lists/kernel/msg2659906.html Thanks! -- Gustavo A. R. Silva