From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH 2/2] Compiler Attributes: auxdisplay: panel: use __fallthrough Date: Sun, 21 Oct 2018 11:11:36 -0700 Message-ID: References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-3-miguel.ojeda.sandonis@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20181021171414.22674-3-miguel.ojeda.sandonis@gmail.com> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-sparse@vger.kernel.org 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"