From nobody Tue Dec 2 02:19:00 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1DA202FDC41 for ; Thu, 20 Nov 2025 23:26:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763681195; cv=none; b=Jj5s1dLGUR+Q3MRfpYoQg871ATdG8SPjTMq19AShtl8FsxWn+RAIPYd7FRUqAv3V8iVl9/03rXxAB5Uu6U1YHqFCNEVcZQEH21c8xBGWWvlTCSbvLwp2pYtwQzVGfUFkTiMQixDxiVYSXjIrSfNB2/c7UxNguA87gJjmRJudEec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763681195; c=relaxed/simple; bh=ZPmZU2v8Q39n0rqxWl1dh3Kdo500pQiMxI6cmDSvFQc=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=RaIptRF9oWXE9XTmL40SeC1d0IYdhBtA82bMWm93wbUDcKs1p1SzeBDjuAHswk7l16EMNHzMo3YlCRaGkAUYdWfEPy9Uq+UF66mD6p09UbtoXxfHkKS4mes8RTbgeZwdPhmu4+os4qAfmtbmIloZda0L46r4v+A9qtFnpgJorcA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jylGa+qY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jylGa+qY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACA66C116B1; Thu, 20 Nov 2025 23:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763681194; bh=ZPmZU2v8Q39n0rqxWl1dh3Kdo500pQiMxI6cmDSvFQc=; h=Date:From:To:Cc:Subject:References:From; b=jylGa+qYBMse1pA4wjh7EiMpi2qrVEjz/uXuoK3fIti5He+COUvkQPzHEuj24zEGY CSLmQaK5NKsTfSJbxMy5UGm1l1beFS8/2pj/se55zlsOXnH/U3iXhqlpLjdOwhIOYC zbTEzfMu4qA48ybcf/QkYpzU+CYa+P8R3v64A0QM3QleYBFkFxfnHfeB190ns4uWYG LGcpIMqG6Qi8BMcKACj7Enwh/FAjwcoDr1REUOp71HBRgwJHkJ1kK80/Jjb7ipssZ3 l4IYMmYvJ7CUcRZFvgUmC6f1QB2j3mcRRfMt6aDclkYpXLkMY0zD/oX/GUWGHsZ1Bb nr+a5CZW999HQ== Received: from rostedt by gandalf with local (Exim 4.98.2) (envelope-from ) id 1vME3P-000000041rE-3DAV; Thu, 20 Nov 2025 18:27:07 -0500 Message-ID: <20251120232707.612143662@kernel.org> User-Agent: quilt/0.68 Date: Thu, 20 Nov 2025 18:23:25 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Tomas Glozar , John Kacur , Costa Shulyupin Subject: [for-next][PATCH 02/16] tools/rtla: Remove unused optional option_index References: <20251120232323.271532418@kernel.org> 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 Content-Type: text/plain; charset="utf-8" From: Costa Shulyupin The longindex argument of getopt_long() is optional and tied to the unused local variable option_index. Remove it to shorten the four longest functions and make the code neater. Signed-off-by: Costa Shulyupin Reviewed-by: Tomas Glozar Link: https://lore.kernel.org/r/20251002123553.389467-2-costa.shul@redhat.c= om Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/osnoise_hist.c | 5 +---- tools/tracing/rtla/src/osnoise_top.c | 5 +---- tools/tracing/rtla/src/timerlat_hist.c | 5 +---- tools/tracing/rtla/src/timerlat_top.c | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src= /osnoise_hist.c index 844f0468953c..df0657b78980 100644 --- a/tools/tracing/rtla/src/osnoise_hist.c +++ b/tools/tracing/rtla/src/osnoise_hist.c @@ -524,11 +524,8 @@ static struct common_params {0, 0, 0, 0} }; =20 - /* getopt_long stores the option index here. */ - int option_index =3D 0; - c =3D getopt_long(argc, argv, "a:c:C::b:d:e:E:DhH:p:P:r:s:S:t::T:01234:5= :6:7:", - long_options, &option_index); + long_options, NULL); =20 /* detect the end of the options. */ if (c =3D=3D -1) diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/= osnoise_top.c index defa1eb63bee..1b5181e66b17 100644 --- a/tools/tracing/rtla/src/osnoise_top.c +++ b/tools/tracing/rtla/src/osnoise_top.c @@ -376,11 +376,8 @@ struct common_params *osnoise_top_parse_args(int argc,= char **argv) {0, 0, 0, 0} }; =20 - /* getopt_long stores the option index here. */ - int option_index =3D 0; - c =3D getopt_long(argc, argv, "a:c:C::d:De:hH:p:P:qr:s:S:t::T:0:1:2:3:", - long_options, &option_index); + long_options, NULL); =20 /* Detect the end of the options. */ if (c =3D=3D -1) diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/sr= c/timerlat_hist.c index 02d3ffd2cf4b..c432ef5f59e7 100644 --- a/tools/tracing/rtla/src/timerlat_hist.c +++ b/tools/tracing/rtla/src/timerlat_hist.c @@ -840,11 +840,8 @@ static struct common_params {0, 0, 0, 0} }; =20 - /* getopt_long stores the option index here. */ - int option_index =3D 0; - c =3D getopt_long(argc, argv, "a:c:C::b:d:e:E:DhH:i:knp:P:s:t::T:uU01234= 56:7:8:9\1\2:\3:", - long_options, &option_index); + long_options, NULL); =20 /* detect the end of the options. */ if (c =3D=3D -1) diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src= /timerlat_top.c index 607b57f2f231..82e227d27af7 100644 --- a/tools/tracing/rtla/src/timerlat_top.c +++ b/tools/tracing/rtla/src/timerlat_top.c @@ -604,11 +604,8 @@ static struct common_params {0, 0, 0, 0} }; =20 - /* getopt_long stores the option index here. */ - int option_index =3D 0; - c =3D getopt_long(argc, argv, "a:c:C::d:De:hH:i:knp:P:qs:t::T:uU0:1:2:34= 5:6:7:", - long_options, &option_index); + long_options, NULL); =20 /* detect the end of the options. */ if (c =3D=3D -1) --=20 2.51.0