From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796264777; b=EQ6ocZjhRXA581W6vEe+zTfLhZJ/E7+aVPX48QsGEHbsg+XIf627p2MyilqSsqCNNd8C U/Ge/C4adhGNEYgwTQ4jexPKfsnCNSQVbLw7B08/VKfo6ygXIYeR9Ij8cPsv/1w3/OjCL ctNx7kUTTWZhltKS9oDmlJkIBUTMq3mQ3/JHqqnd1qpWgrHuDIEtpQF6B8ov0HE4YfS4u LtHMR5+wSU95R5zCds5UpgNPWqWo8D8IqzyAMVPc8A2D9Jj0nb6lDupvk6s65Cd6P6TJw BFIlhgVbtY4ptd5cgxzvw6z3A5nedD9jdpffbJ8Hw4kzVhs0ds4quhsUb/GVBqwJCYQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796264777; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=0RgvSnL51QaS+VV646yXEYLkA3xRawpK8UQKU3FoTvo=; b=y89D6JrDFeTvIgnbf/B/tAlUOiZG8RS7L9S7G10tTWUJKF11i5RXAWwXJNafde1WNytJ vUlZIuGGfkw0DSMARWw9eZ1VpECTabLS37OwFKzhZJVd5ShLUcrWvqvEW3xJskpbc73j9 p1zjhmJ9k4HpeP5CEFzl6qUHqXcZYAQPJkwLHqMhE2z8D9+gvmOdq3S7OM9xO1SsA+V0R K9CrCQQANQrFdOsvUwB8sAwI4NMarkXKh+KSaxiEKuOrkyPN/CkufarEgn83Cn7uQo+ey LdUoGfyoDsRz0zou+yZGaJAVAr03xZhaWygLSgTZn5syWHdPnFtBUv1gAkovxHSyQgA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Vih2me5W; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CBA9606A322 for ; Thu, 3 Dec 2026 02:26:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Vih2me5W Received: by smtp.kernel.org (Postfix) with ESMTPSA id 190B71F000C1; Thu, 3 Dec 2026 02:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796264777; bh=0RgvSnL51QaS+VV646yXEYLkA3xRawpK8UQKU3FoTvo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Vih2me5WOI3wdFMYlLMSTIneh9VVOz1ufmA1Tt6VbD42Jkh0cFRbgFwzwnryh9TYP 4Q9w8OyzhS4O/nQGFDiaAjrrQpyvz07L7B//3qVfgk+huN2szpREe42UbtjgivpYb2 dZN0/UySqZzyFVdcD5QHUj2QqZOsV518WPtrhfhUzbrX5Leh5LO+6IE/hum/BHP1fH HwsUp1EGdBQP8SBb06cd+cLgtYkADQS9ZRTgv77JRGTkzttCQwJhfpG8YAsjMF50dc 5uwB4UJ6vho1Vl3pDXrm62HGivICti2uOxK9zzyy5lCH1ST4KIpltlo5eEUSunp5VJ gibNcwTYXd3RQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] perf annotate: Return an error for --gtk with --show-nr-samples Reply-To: sashiko-reviews@lists.linux.dev To: "Weidong Wang" Cc: linux-perf-users@vger.kernel.org In-Reply-To: <20261202-kbug-l1942-v1-1-67b010d660ea@illinois.edu> References: <20261202-kbug-l1942-v1-1-67b010d660ea@illinois.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 02:26:16 +0000 X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > From: Weidong Wang >=20 > cmd_annotate() rejects --show-nr-samples in --gtk mode by printing an > error and returning ret. At that point ret holds the successful result > of hists__init() and is not updated again, so it is 0 and perf annotate > exits with status 0 without doing anything. >=20 > Return -EINVAL instead, as the other option checks in the function do, > so the failure is visible to callers. >=20 > Found by a static analysis tool. >=20 > The fix and this changelog were drafted with AI assistance (Claude Code, > with a second review by OpenAI Codex), then reviewed by the submitter. >=20 > Fixes: 1ac39372e06f ("perf annotate stdio: Support --show-nr-samples opti= on") > Signed-off-by: Weidong Wang Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202-kbug-l1942= -v1-1-67b010d660ea@illinois.edu?part=3D1