From nobody Sun Feb 8 07:40:23 2026 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 463FE1C3BE6 for ; Wed, 22 Jan 2025 06:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737527172; cv=none; b=FiVBx32/2XavGgb27L/wKAQUH03gykown2M8ph/nXfoxYySsIZrUwIdj759iBWFe2RJRM/aT7gko9//QPv1e9x1Frl3kZww/3exOD+EFXd7FOGidL457CDNkhcjwp8RKCbM173WSpIjhwtKMJX0cpndSStJ8mmsKcPEuzbtnC3w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737527172; c=relaxed/simple; bh=BfQOAR1G+at7pRYGYXzHQjPEnrcQ33cHSvtWSYC7XKw=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=Ca0qa61+5RWTUJKiD+0uqAT96nRZUSMVjpwm2EzgkRrtaUkjdKBIoHkXLChhqpOOQzhRFBxrizq3T0q0Snh+0oZSYdZVIZjKLHX7eC6UF36UzqfoNeAwEd7n4YeLORZe2Q48h+GIexbAR6JlTokcdkflt7rrGDxZq0IVXeCKq6Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=EO4DABGB; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EO4DABGB" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e549de22484so17112005276.2 for ; Tue, 21 Jan 2025 22:26:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737527169; x=1738131969; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=jgqdWXIgH31oO69HT02RtwzG7MxuXhHOOr55YpEQGAs=; b=EO4DABGB9M5LH0lBfxs+nYZ3Iz/nFBetOUEARsxxJEg0B5zbSzZFbJtoAlFcpiBhYq oYFGSwmYzsTv6D8qdQMVbyNC9DxM2RczL3JHXtwKOWP7cKZCdF1JkQOHNRpV126iKsoJ t5bTwlCVRZBd8wS6k5YJyjOB8qXRxI19JMH6MSYJKLBl6ZVEN8VRb2FRCYR95ih6F3A8 s/FUteA9lJvOxpY9sd1HSFfVOam4PMTNiIm88FHrtvrClCKj3ITkY9JjKe1D+ydTV+5v aoxGxWH1/2l+0WxiAsM8iwWm3EmnnAInrLuOxH8UqixMeHMkwwC6z9EHeOdb3mwbvEo4 BwFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737527169; x=1738131969; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jgqdWXIgH31oO69HT02RtwzG7MxuXhHOOr55YpEQGAs=; b=UCztq3ggkUFVGsxAe4GeoNtMbQROjQBxuZgVlmJYf3pm4p7LGnU3MZmL6ypgNRWHwd Me6FYsMDhMS8qERli/IWFOZs4uh2WK1+6TkNg/saOo1Euo4UGDuHNVLprmOW+eRLqSku by2R4yY90qFLW/2gZOIezIH3MAcFHuE/XKv0zadKfb95RqFQu8T+HwUFagTixEpSki5f Sc/rSHBnqQ4wyjszZGonR9x0muQh65G+XLBBbLxixg76XYWAMztYu9xlJFWGHEV1J6rm 68ZOUeje0TGvjwwdiEH/4rkvrnOUR+yi2WimmE7Y64OftoR+nexFmf7RLZQrKNcjUjOZ 611Q== X-Forwarded-Encrypted: i=1; AJvYcCWh2Rw7QhlQbnATvlkNou3kh5KyWMhX85YUzZXdjDQnSO7VfiOv4ITC2tlYTpFT1TMhljfTplqgPardKfI=@vger.kernel.org X-Gm-Message-State: AOJu0YxZUbwqDrTuF1FR7hGppdzkrw/SJXGgeqgMjUg/A+pCMwmvP0CU eQVa+SAoE3he4vu9Bv+6ppu2RlK/rUdyPt6LVxfSV01MswhQrFiNonhNH1uHBpUHTqATqCKWd5K 0KFuoeA== X-Google-Smtp-Source: AGHT+IF6rwzVNy8tbQ12mHzbRHmKpJHEzsK35EPLx3KJfYalflkJcjMfzIoyWZyP5IcEbo2YvBdof+rOLPE0 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:807b:be79:d5c3:ee5c]) (user=irogers job=sendgmr) by 2002:a05:690c:3005:b0:6e9:f188:8638 with SMTP id 00721157ae682-6f6eb9475efmr341777b3.7.1737527169492; Tue, 21 Jan 2025 22:26:09 -0800 (PST) Date: Tue, 21 Jan 2025 22:23:32 -0800 In-Reply-To: <20250122062332.577009-1-irogers@google.com> Message-Id: <20250122062332.577009-18-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250122062332.577009-1-irogers@google.com> X-Mailer: git-send-email 2.48.0.rc2.279.g1de40edade-goog Subject: [PATCH v2 17/17] perf disasm: Make ins__scnprintf and ins__is_nop static From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Aditya Gupta , "Steinar H. Gunderson" , Charlie Jenkins , Changbin Du , "Masami Hiramatsu (Google)" , James Clark , Kajol Jain , Athira Rajeev , Li Huafei , Dmitry Vyukov , Andi Kleen , Chaitanya S Prakash , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev, Song Liu , bpf@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Reduce the scope of ins__scnprintf and ins__is_nop that aren't used outside of disasm.c. Signed-off-by: Ian Rogers --- tools/perf/util/disasm.c | 6 +++--- tools/perf/util/disasm.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c index ebd86691acf8..b2dfd40588ef 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -246,8 +246,8 @@ static int ins__raw_scnprintf(struct ins *ins, char *bf= , size_t size, return scnprintf(bf, size, "%-*s %s", max_ins_name, ins->name, ops->raw); } =20 -int ins__scnprintf(struct ins *ins, char *bf, size_t size, - struct ins_operands *ops, int max_ins_name) +static int ins__scnprintf(struct ins *ins, char *bf, size_t size, + struct ins_operands *ops, int max_ins_name) { if (ins->ops->scnprintf) return ins->ops->scnprintf(ins, bf, size, ops, max_ins_name); @@ -824,7 +824,7 @@ static struct ins_ops ret_ops =3D { .scnprintf =3D ins__raw_scnprintf, }; =20 -bool ins__is_nop(const struct ins *ins) +static bool ins__is_nop(const struct ins *ins) { return ins->ops =3D=3D &nop_ops; } diff --git a/tools/perf/util/disasm.h b/tools/perf/util/disasm.h index 2cb4e1a6bd30..09c86f540f7f 100644 --- a/tools/perf/util/disasm.h +++ b/tools/perf/util/disasm.h @@ -110,13 +110,10 @@ struct arch *arch__find(const char *name); bool arch__is(struct arch *arch, const char *name); =20 struct ins_ops *ins__find(struct arch *arch, const char *name, struct disa= sm_line *dl); -int ins__scnprintf(struct ins *ins, char *bf, size_t size, - struct ins_operands *ops, int max_ins_name); =20 bool ins__is_call(const struct ins *ins); bool ins__is_jump(const struct ins *ins); bool ins__is_fused(struct arch *arch, const char *ins1, const char *ins2); -bool ins__is_nop(const struct ins *ins); bool ins__is_ret(const struct ins *ins); bool ins__is_lock(const struct ins *ins); =20 --=20 2.48.0.rc2.279.g1de40edade-goog