From patchwork Mon Apr 17 10:46:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 84165 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2030445vqo; Mon, 17 Apr 2023 04:01:27 -0700 (PDT) X-Google-Smtp-Source: AKy350aY3L2XTVYpOGYrvAQDbcp0LbtbZ9Qn4jvcu6aQRLuhAKgkLCg6TuZcyUnHUgGskkJYU2Yr X-Received: by 2002:a05:6808:2905:b0:383:ee1d:f489 with SMTP id ev5-20020a056808290500b00383ee1df489mr7147197oib.0.1681729286960; Mon, 17 Apr 2023 04:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681729286; cv=none; d=google.com; s=arc-20160816; b=WB0xUJfU8qixaVLArNhCZO7ek3ng6FReAdp00y84oNYMHM+KCQ1X/QdRHlZe0pea1B jjcfcMFTW5yo8ZW6FbjJDIGB2vq4xwxCXuPalF0xj7ymtdSmCyk0UNOiosCypLs7xzhP an/VjFZ5YUQ/vwvvu/iS88QAeqkDU2n6fNTvculhWZ47fzmHeaRk0hKqYRxL3bhde3zE ey9VBNMKwhmHTE9VBXEc9gYK4D/H+SGwfc1yjilTiAzuU53BFStxFelcFHaiL4GdgDd6 A3QfbSIGYUxcEDk8KUuYMTon31o/0uYXhOP7cq8TYaBODmFylsT4sn3VlvgwvsBVGLpj bm5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=lHCuVIKv9lJeUMV86l7lW7YN40YLX6EODBOItfrACTY=; b=Y/DRn+rH4zlr8NGxQ0rb4Ft/efmSaq5D7PYXeshBsXo65CTYus60XR4cYx1+MnB4q3 b59Xo8n7WZYEryLWG6cb8o36blLLfiIqP6u93QuuE+y6FbmwABb2cHCdxetjVVKqD0E4 y7yVZg0/af6Fkr5LSiw73ksjHkU/c9hTVru/ttNsKUBh/9UxeuhZHvmHCfdrneSY2yiq kkQKCKUrUZmRpmACzARIClsLoG65FDaAtNZ6UJRFoYgSbxSB9cUichTN+YHjUCFa8OMv gMussNeW4F9awCdhlmTkg3qQUIjTa1mb1vtWvMmMisAR8cQOiKcttUHt4v9VD6o0lot4 HDag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jie2ZkFU; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=U9keWq0T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a0568708a0d00b001877a8f9ce6si6739569oaq.64.2023.04.17.04.01.12; Mon, 17 Apr 2023 04:01:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jie2ZkFU; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=U9keWq0T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230403AbjDQKvj (ORCPT + 99 others); Mon, 17 Apr 2023 06:51:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230397AbjDQKvC (ORCPT ); Mon, 17 Apr 2023 06:51:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87F655BB7; Mon, 17 Apr 2023 03:50:12 -0700 (PDT) Date: Mon, 17 Apr 2023 10:46:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681728406; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lHCuVIKv9lJeUMV86l7lW7YN40YLX6EODBOItfrACTY=; b=jie2ZkFUYAIOb/ESCiCoALxlQiYXnlsxWvlcUgji4tRIiYEG4VRjfCZEFpW+Hfn4eec64N 8vAyuIXsxmlUEW7JHUOFwBeBACprfDSeQJ2SaaHnwwDLSyESuZLFC3ggrruS2cv5aQctNs JDhbu52tBSAYxBvVj+zNy1EL38DNoqbzZjk/9O7dhyRq8OM03JAmhWuhXFObuDUd790QYV dH/AFkcxotigxvkR9IBh6bVkfSvQcJFghvkRAoKoQ13QUyvi+FU2TplASOO7Glb2NO218m rvZg2TxMZyljHOajR+6vTkGYd0FO69w8KtOrGFSAW+Eysp92EREm8lBv8OrM+Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681728406; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lHCuVIKv9lJeUMV86l7lW7YN40YLX6EODBOItfrACTY=; b=U9keWq0TBpKplrTDUBvfyDCcRRiQHQkvWhFapBRFh+sxSDCavPCrwn6QW66Pur9nVp0UFA RwNTYHuJERFiXvDg== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] btrfs: Mark btrfs_assertfail() __noreturn Cc: kernel test robot , Josh Poimboeuf , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <960bd9c0c9e3cfc409ba9c35a17644b11b832956.1681342859.git.jpoimboe@kernel.org> References: <960bd9c0c9e3cfc409ba9c35a17644b11b832956.1681342859.git.jpoimboe@kernel.org> MIME-Version: 1.0 Message-ID: <168172840624.404.13655279959647957415.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763016412621536822?= X-GMAIL-MSGID: =?utf-8?q?1763420968689688853?= The following commit has been merged into the objtool/core branch of tip: Commit-ID: 09c5ae30d007514a1be870fa5873ad55c3319f3a Gitweb: https://git.kernel.org/tip/09c5ae30d007514a1be870fa5873ad55c3319f3a Author: Josh Poimboeuf AuthorDate: Wed, 12 Apr 2023 16:49:38 -07:00 Committer: Peter Zijlstra CommitterDate: Fri, 14 Apr 2023 17:31:26 +02:00 btrfs: Mark btrfs_assertfail() __noreturn Fixes a bunch of warnings including: vmlinux.o: warning: objtool: select_reloc_root+0x314: unreachable instruction vmlinux.o: warning: objtool: finish_inode_if_needed+0x15b1: unreachable instruction vmlinux.o: warning: objtool: get_bio_sector_nr+0x259: unreachable instruction vmlinux.o: warning: objtool: raid_wait_read_end_io+0xc26: unreachable instruction vmlinux.o: warning: objtool: raid56_parity_alloc_scrub_rbio+0x37b: unreachable instruction ... Reported-by: kernel test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/960bd9c0c9e3cfc409ba9c35a17644b11b832956.1681342859.git.jpoimboe@kernel.org --- fs/btrfs/messages.c | 2 +- fs/btrfs/messages.h | 2 +- tools/objtool/check.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/messages.c b/fs/btrfs/messages.c index fde5aaa..310a05c 100644 --- a/fs/btrfs/messages.c +++ b/fs/btrfs/messages.c @@ -253,7 +253,7 @@ void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, #endif #ifdef CONFIG_BTRFS_ASSERT -void __cold btrfs_assertfail(const char *expr, const char *file, int line) +void __cold __noreturn btrfs_assertfail(const char *expr, const char *file, int line) { pr_err("assertion failed: %s, in %s:%d\n", expr, file, line); BUG(); diff --git a/fs/btrfs/messages.h b/fs/btrfs/messages.h index 8c516ee..ac2d198 100644 --- a/fs/btrfs/messages.h +++ b/fs/btrfs/messages.h @@ -160,7 +160,7 @@ do { \ } while (0) #ifdef CONFIG_BTRFS_ASSERT -void __cold btrfs_assertfail(const char *expr, const char *file, int line); +void __cold __noreturn btrfs_assertfail(const char *expr, const char *file, int line); #define ASSERT(expr) \ (likely(expr) ? (void)0 : btrfs_assertfail(#expr, __FILE__, __LINE__)) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index ae0c942..ceb9848 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -204,6 +204,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, "__ubsan_handle_builtin_unreachable", "arch_call_rest_init", "arch_cpu_idle_dead", + "btrfs_assertfail", "cpu_bringup_and_idle", "cpu_startup_entry", "do_exit",