From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbdK1V0B (ORCPT ); Tue, 28 Nov 2017 16:26:01 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:35781 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbdK1V0A (ORCPT ); Tue, 28 Nov 2017 16:26:00 -0500 Date: Tue, 28 Nov 2017 22:25:40 +0100 (CET) From: Thomas Gleixner To: "Gustavo A. R. Silva" cc: Alan Cox , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, LKML , Kees Cook Subject: Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs In-Reply-To: <20171128142532.Horde.i2oBtHDOaD7XV1M3yAL7rga@gator4166.hostgator.com> Message-ID: References: <20171127235253.GA20384@embeddedor.com> <20171128120512.Horde.1mz61Up1PsNtyHbrjWmK8L7@gator4166.hostgator.com> <20171128122235.Horde.vFP-9ZfAP0f9BFNePB8Z8xi@gator4166.hostgator.com> <20171128190032.2b1fa464@alans-desktop> <20171128142532.Horde.i2oBtHDOaD7XV1M3yAL7rga@gator4166.hostgator.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote: > The thing about taking 'any comment' as valid is false if you add the > following to your Makefile: > > KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough) > > This option takes the following comments as valid: > > /* fall through */ > /* Fall through */ > /* fall through - ... */ > /* Fall through - ... */ > > Comments as fallthru, fallthrough, FALLTHRU are invalid. > > And of course if you intentionally change the option to: > > KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=1) > > it means that you obviously want to ignore any warning. So I have to ask WHY this information was not in the changelog of the patch in question: 1) How it works 2) Why comments have been chosen over macros > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. It's not a reviewers job to chase that information down. While I can understand that the comments are intentional due to existing tools, I still prefer the macro/annotation. But I'm not religious about it when there is common consensus. :) Thanks, tglx