From nobody Tue Dec 2 02:58:57 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6987533291B for ; Mon, 17 Nov 2025 18:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763405772; cv=none; b=moPgqp49cx27zmrJ+0oW10MDvIvyqQxaPfQ9jXsAvDmqjWXLIEuEalM3bQLVPlKlB5E1GDChjfE/JWABydpftrCfdLxF4lYeuXkYDVa+blsH3+JA652wlmXKnerMfMsnZ4Tg+AtZETCcwScXRb/hIGJUmv6N/zttYNkzBp9Jyj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763405772; c=relaxed/simple; bh=zuQMygyE/fNMvfguYZAXLubepSrga+iMRwkhc12myPo=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lniG4sXd9GyrG9l24761sNQ2k/H53kwfzkyq8m4f+GsXxPWhwC9RhR4J7n6j36+dG71YOONHJH5JnzE0JkVOOts3rcuyUpNgPvhMZHLnCFWRpRRW872HvGzQSltsWO2uMzCC2KgqD6LTvY20rJG671FqiR6pWeCEESEyCMa7Dqk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=N6jSf2/9; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="N6jSf2/9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763405770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rkhAYW9mMK6YIr6jWOVp1CntEtvFvQsO6wElJ8Bztr0=; b=N6jSf2/9L+GQPFKg+dcUInw+ToTvcGWPhvA64JMTDi9/UhKRPbtlNmPNGwlMKEPlBm6eUC oI2OickUgBewkOoGN/+OXMgq+/O0euvKe+yrQ3atcPZmSBa329BlOeLF0MPNcOp86jSVCt yrGTC5fHEzRuYsbo0P3iXyyCNBJ+J9c= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-641-coE_3v_4Om-tNrqBEl3pSw-1; Mon, 17 Nov 2025 13:56:07 -0500 X-MC-Unique: coE_3v_4Om-tNrqBEl3pSw-1 X-Mimecast-MFC-AGG-ID: coE_3v_4Om-tNrqBEl3pSw_1763405766 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 00D97180122F; Mon, 17 Nov 2025 18:56:06 +0000 (UTC) Received: from wcosta-thinkpadt14gen4.rmtbr.csb (unknown [10.22.81.153]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 22E041800298; Mon, 17 Nov 2025 18:56:00 +0000 (UTC) From: Wander Lairson Costa To: Steven Rostedt , Wander Lairson Costa , Tomas Glozar , Ivan Pravdin , Crystal Wood , John Kacur , Costa Shulyupin , Tiezhu Yang , linux-trace-kernel@vger.kernel.org (open list:Real-time Linux Analysis (RTLA) tools), linux-kernel@vger.kernel.org (open list), bpf@vger.kernel.org (open list:BPF [MISC]:Keyword:(?:\b|_)bpf(?:\b|_)) Subject: [rtla 08/13] rtla: Use standard exit codes for result enum Date: Mon, 17 Nov 2025 15:41:15 -0300 Message-ID: <20251117184409.42831-9-wander@redhat.com> In-Reply-To: <20251117184409.42831-1-wander@redhat.com> References: <20251117184409.42831-1-wander@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" The result enum defines custom values for PASSED, ERROR, and FAILED. These values correspond to standard exit codes EXIT_SUCCESS and EXIT_FAILURE. Update the enum to use the standard macros EXIT_SUCCESS and EXIT_FAILURE to improve readability and adherence to standard C practices. The FAILED value is implicitly assigned EXIT_FAILURE + 1, so there is no need to assign an explicit value. Signed-off-by: Wander Lairson Costa --- tools/tracing/rtla/src/utils.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/tracing/rtla/src/utils.h b/tools/tracing/rtla/src/utils.h index f7ff548f7fba7..beff211fdae2d 100644 --- a/tools/tracing/rtla/src/utils.h +++ b/tools/tracing/rtla/src/utils.h @@ -4,6 +4,7 @@ #include #include #include +#include =20 /* * '18446744073709551615\0' @@ -97,7 +98,7 @@ bool strtoi(const char *s, int *res); #define ns_to_per(total, part) ((part * 100) / (double)total) =20 enum result { - PASSED =3D 0, /* same as EXIT_SUCCESS */ - ERROR =3D 1, /* same as EXIT_FAILURE, an error in arguments */ - FAILED =3D 2, /* test hit the stop tracing condition */ + PASSED =3D EXIT_SUCCESS, + ERROR =3D EXIT_FAILURE, + FAILED, /* test hit the stop tracing condition */ }; --=20 2.51.1