Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5963180rwe; Tue, 18 Apr 2023 14:29:31 -0700 (PDT) X-Google-Smtp-Source: AKy350ZCa8COfRgyK55q/g0KzdrvdFFh9Jsu9kYyE+wZ8eTliCgiRc9jwisUbKQp0YuvVSV0wMt9 X-Received: by 2002:a05:6a21:9999:b0:ee:f10d:7c7c with SMTP id ve25-20020a056a21999900b000eef10d7c7cmr1026600pzb.8.1681853371572; Tue, 18 Apr 2023 14:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681853371; cv=none; d=google.com; s=arc-20160816; b=Q75sH4NuGUS8m2LUNHgkGlsRqJP48Qir8VH3ZaKBjM0bDBmgBNrj/nEh/eUNymQrfb JQ2iaQ0BcuZI3yxOYxbAWw0E5e6ik8u4yCkCaWLYM245PsrQzsZ1tqSZsJbW+rPYKtOR XPvTQYcpgtucQJtFZttJwIkZmeiKQU6k3PcsVO2tMEel01a16eEFmjesNnTeCNazAm/G 1BRgnRZ0+oQwIQtXGG53xU7nbsfGEosw0/8p3ucHrtyJlZd+A9LayrC1yV7xGm+aKZm7 xEDdk51LbXb92MdLJa8J5w+yM738HA7RYTnWp+5QWrnkqWiKIHcpdTw1QjvQ+flR74Uq u7uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1DnR2NJ1U0549L48VfEBxvh+J3bBte1vEClY1vjW8Rg=; b=exQhWvhTxc8YlT9LQuAxEXCBKv0G92huQBWouXolkdvqJSty3jU19eKUP3jmNNfSDq 4XwG6Ohy6XkcxOOyKWDp+Jm4rMZY9BaW15E6XQLv6r71L3z3I/MHA5lDchc/hcg8QjXP EZXs92Jht+TrungAk1lphR7n5SCSNqf44SH1CeyzcKUSiZQtUYjPoRKwfhCic16yNO2t GuLDWe/QgtLxKIT2HS80od8k2giHlT3HYhJk1nC5dfT+WRIqLXBqdrKDzI5npoM3M3oN w5Eh+trad2Sp3Qqnpsulocz5KE1NBLfxsute0UVmrGi/bkxEk8dYUkx9rOU7kLlI7KXG 3aTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c0blbe4l; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p33-20020a634f61000000b005187d97af84si14935519pgl.12.2023.04.18.14.29.17; Tue, 18 Apr 2023 14:29:31 -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=@kernel.org header.s=k20201202 header.b=c0blbe4l; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232952AbjDRV2k (ORCPT + 99 others); Tue, 18 Apr 2023 17:28:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232996AbjDRV2e (ORCPT ); Tue, 18 Apr 2023 17:28:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 270FFC671 for ; Tue, 18 Apr 2023 14:28:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 172B96393D for ; Tue, 18 Apr 2023 21:28:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A98FCC433A1; Tue, 18 Apr 2023 21:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681853281; bh=rKNOJA2iFxFHQD00gPxbX9WeLPWBE9JGs0wdA5OiRv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c0blbe4lLqfHHadAtOQFMEbIpw6pqLcijlz7BFygBypbTqIXXrbuq+bnKXo2qQOBu NULyMH4LXCIdMoKckY0Yr3CwAt3oS6pyE/2aJnwD2NwZHBFsAKwEMBGJInOdBwf3lC QX8TAaHzTIS1uGJ+DJHBuWCMZrryJYd9PLT8qK4Z+//BZSiSJG7y/o/Q5tf6sRg4m8 DlbxA992QxOtLr9oD9r+tS5cCJcI+batN2VA+4n9ZspK1y4iZ/xAaO5kKpZp+4iXxd UTqRKHX/qAq8KrnFuqhjgFUPbc0Oq7pl3Ky20SgdthWPVxxSBowFQxl14CXSxakaNZ NXx5512m9DnWQ== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Miroslav Benes , Nick Desaulniers Subject: [PATCH v3 7/8] tools/lib/subcmd: Replace NORETURN usage with __noreturn Date: Tue, 18 Apr 2023 14:27:53 -0700 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 NORETURN is redundant with __noreturn, just use the latter. Signed-off-by: Josh Poimboeuf --- tools/lib/subcmd/parse-options.h | 8 ++------ tools/lib/subcmd/subcmd-util.h | 5 ++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tools/lib/subcmd/parse-options.h b/tools/lib/subcmd/parse-options.h index 41b9b942504d..8e9147358a28 100644 --- a/tools/lib/subcmd/parse-options.h +++ b/tools/lib/subcmd/parse-options.h @@ -6,10 +6,6 @@ #include #include -#ifndef NORETURN -#define NORETURN __attribute__((__noreturn__)) -#endif - enum parse_opt_type { /* special types */ OPTION_END, @@ -183,9 +179,9 @@ extern int parse_options_subcommand(int argc, const char **argv, const char *const subcommands[], const char *usagestr[], int flags); -extern NORETURN void usage_with_options(const char * const *usagestr, +extern __noreturn void usage_with_options(const char * const *usagestr, const struct option *options); -extern NORETURN __attribute__((format(printf,3,4))) +extern __noreturn __attribute__((format(printf,3,4))) void usage_with_options_msg(const char * const *usagestr, const struct option *options, const char *fmt, ...); diff --git a/tools/lib/subcmd/subcmd-util.h b/tools/lib/subcmd/subcmd-util.h index b2aec04fce8f..dfac76e35ac7 100644 --- a/tools/lib/subcmd/subcmd-util.h +++ b/tools/lib/subcmd/subcmd-util.h @@ -5,8 +5,7 @@ #include #include #include - -#define NORETURN __attribute__((__noreturn__)) +#include static inline void report(const char *prefix, const char *err, va_list params) { @@ -15,7 +14,7 @@ static inline void report(const char *prefix, const char *err, va_list params) fprintf(stderr, " %s%s\n", prefix, msg); } -static NORETURN inline void die(const char *err, ...) +static __noreturn inline void die(const char *err, ...) { va_list params; -- 2.39.2