Return-Path: Received: from smtprelay0164.hostedemail.com ([216.40.44.164]:48852 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727794AbeJVCdV (ORCPT ); Sun, 21 Oct 2018 22:33:21 -0400 Message-ID: Subject: Re: [PATCH 2/2] Compiler Attributes: auxdisplay: panel: use __fallthrough From: Joe Perches To: Miguel Ojeda , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Dan Carpenter , Andreas Dilger , Masahiro Yamada , Michal Marek , Steven Rostedt , Mauro Carvalho Chehab , Olof Johansson , Konstantin Ryabitsev , "David S . Miller" , Andrey Ryabinin , Kees Cook , Thomas Gleixner , Ingo Molnar , Paul Lawrence , Sandipan Das , Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , Paul Burton , David Rientjes , Willy Tarreau , Martin Sebor , Christopher Li , Jonathan Corbet , Theodore Ts'o , Geert Uytterhoeven , Rasmus Villemoes , Arnd Bergmann , Dominique Martinet , Stefan Agner , Luc Van Oostenryck , Nick Desaulniers , Andrew Morton , Linus Torvalds , linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-sparse@vger.kernel.org, linux-kbuild@vger.kernel.org Date: Sun, 21 Oct 2018 11:11:36 -0700 In-Reply-To: <20181021171414.22674-3-miguel.ojeda.sandonis@gmail.com> References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-3-miguel.ojeda.sandonis@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-ext4-owner@vger.kernel.org List-ID: On Sun, 2018-10-21 at 19:14 +0200, Miguel Ojeda wrote: > Let gcc know these cases are meant to fall through to the next label > by annotating them with the new __fallthrough statement attribute; > and remove the comment since it conveys the same information > (which was also parsed by gcc to suppress the warning). Instead of many individual conversion patches, perhaps a script to do all the conversions at once. Maybe: pattern='(?:\/\*\s*fall(?:\s*|\s*\-\s*)thr(?:u|ough)\s*\*\/|\/\/\s*fall\s*thr(?:u|ough)\s*$)' git grep -P -i --name-only "$pattern" -- '*.[ch]' | xargs perl -p -i -e "s/$pattern/__fallthrough;/gi"