From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 743B9C43463 for ; Fri, 18 Sep 2020 01:36:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C3C82075B for ; Fri, 18 Sep 2020 01:36:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbgIRBgJ (ORCPT ); Thu, 17 Sep 2020 21:36:09 -0400 Received: from smtprelay0209.hostedemail.com ([216.40.44.209]:49280 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725886AbgIRBgI (ORCPT ); Thu, 17 Sep 2020 21:36:08 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id 6C077182CF66A; Fri, 18 Sep 2020 01:36:07 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: home77_5210bfa27127 X-Filterd-Recvd-Size: 2929 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Fri, 18 Sep 2020 01:36:03 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2] nfs: remove incorrect fallthrough label From: Joe Perches To: Nick Desaulniers Cc: Trond Myklebust , Anna Schumaker , "Gustavo A . R . Silva" , Nathan Chancellor , Hongxiang Lou , Miaohe Lin , linux-nfs@vger.kernel.org, LKML , clang-built-linux Date: Thu, 17 Sep 2020 18:36:01 -0700 In-Reply-To: References: <9441ed0f247d0cac6e85f3847e1b4c32a199dd8f.camel@perches.com> <20200916200255.1382086-1-ndesaulniers@google.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-09-17 at 14:41 -0700, Nick Desaulniers wrote: > On Wed, Sep 16, 2020 at 1:19 PM Joe Perches wrote: > > On Wed, 2020-09-16 at 13:02 -0700, Nick Desaulniers wrote: > > > * (call of function with __attribute__(__noreturn__)) > > > > I guess panic counts. I count 11 of those. > > > > Are there any other uses of functions with __noreturn > > in switch/case label blocks? > > If you look at global_noreturns in tools/objtool/check.c: > 145 static const char * const global_noreturns[] = { > 146 "__stack_chk_fail", > 147 "panic", > 148 "do_exit", > 149 "do_task_dead", > 150 "__module_put_and_exit", > 151 "complete_and_exit", > 152 "__reiserfs_panic", > 153 "lbug_with_loc", > 154 "fortify_panic", > 155 "usercopy_abort", > 156 "machine_real_restart", > 157 "rewind_stack_do_exit", > 158 "kunit_try_catch_throw", > 159 }; > > Whether they occur or not at the position you ask; I haven't checked. Just fyi: Other than the 11 instances of panic, I found only a single use of any other function above in a switch/case: drivers/pnp/pnpbios/core.c:163: complete_and_exit(&unload_sem, 0); case PNP_SYSTEM_NOT_DOCKED: Found with: $ grep-2.5.4 -rP --include=*.[ch] -n '\b(?:__stack_chk_fail|panic|do_exit|do_task_dead|__module_put_and_exit|complete_and_exit|__reiserfs_panic|lbug_with_loc|fortify_panic|usercopy_abort|machine_real_restart|rewind_stack_do_exit|kunit_try_catch_throw)\s*(?:\([^\)]*\))?\s*;\s*(case\s+\w+|default)\s*:' *