From nobody Mon Apr 6 23:08:24 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 253A6C64991 for ; Thu, 1 Sep 2022 17:33:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234107AbiIARdR (ORCPT ); Thu, 1 Sep 2022 13:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233907AbiIARdK (ORCPT ); Thu, 1 Sep 2022 13:33:10 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CBDF910B7 for ; Thu, 1 Sep 2022 10:33:05 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-33d9f6f4656so237424447b3.21 for ; Thu, 01 Sep 2022 10:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date; bh=XJr3O/WjgV8Oj3RFIIU2dPA6nPGu/zK6BlwHM7Oxyas=; b=H1oG9tgaAu/9JBqRdtDauWPCTkTGEaRUb/l2jm4jF+TLNO/awsbefo2B9gw8Qm7Ntg APvLhm7mKKZy3n8scjtSgSKJemYEosybLpxGKSldb5B1R6SgLPYp0AJKgais1fFcbWMY fTuBaygpXb4K4p7wDQV3Ll19FPxK7g0pTNmqS4T5NSd+XfkLsXZOGH/Slwq9Ot02eGD0 uBnuFW3f6DHdgw9W9FkmGy+SEgJqPK10yy9knuGR2wXV6VR3Jtfhb9zlY+U8Y6+fD7Wq rxVk9pJTZTEcxaeuWXnoEoVZNvmObK6iD2jrqE3lDA6pirseIWkp3Co0erfAnzQ+Elbd vlaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date; bh=XJr3O/WjgV8Oj3RFIIU2dPA6nPGu/zK6BlwHM7Oxyas=; b=Ao3ZjNt+HM6Ws+HVChFjYF2H8s6TRa+A3O93Go/Rg9zthUn1VAoE0R6KS0PMyB98ye hg5xkn+2Pjd3gLayZ8abCrTpr9eGALCIeEAUZlm9EPnsRI2ngZmbffH0q0eIroNgPzzz zH+7SgP0FsQbAFjvx23drEl+oivqSOLgQh8IZpTHbnyevjcjVedkC9i8WQXRwHT2wBZM zfI7OB87etrT7u/8HQAmTPfevj722QRvlpldCzMWT8fU1eh6F3CIvcXncgPQpJpxyLwU 7QTNEcuvDz5DOcW8u3igooABZAE+RsaAWRgIl78vl6VR9+kUghGU03OzvqAcMct20b0y K5Qw== X-Gm-Message-State: ACgBeo1T/CBxKyCETEBHoICSQFBQJAa1mfraZ8tjzUlua6y1bAX6ifrv 51WP5P2ychxOSL7tK69E/6o7S3pspUo= X-Google-Smtp-Source: AA6agR5+qsfqUATGChKbujBDj8Kjg/Yf52WCNi49j0HSHvk7YqI6GPmJk02FO34aTzjM2gKWvJR6fbxq+b0= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:bb8d:0:b0:696:340c:a672 with SMTP id y13-20020a25bb8d000000b00696340ca672mr20209148ybg.332.1662053584444; Thu, 01 Sep 2022 10:33:04 -0700 (PDT) Reply-To: Sean Christopherson Date: Thu, 1 Sep 2022 17:32:55 +0000 In-Reply-To: <20220901173258.925729-1-seanjc@google.com> Mime-Version: 1.0 References: <20220901173258.925729-1-seanjc@google.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog Message-ID: <20220901173258.925729-3-seanjc@google.com> Subject: [PATCH v4 2/5] perf/x86/core: Drop the unnecessary return value from x86_perf_get_lbr() From: Sean Christopherson To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Sean Christopherson , Paolo Bonzini Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Like Xu Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Drop the return value from x86_perf_get_lbr() now that there's no stub, i.e. now that success is guaranteed (which is a bit of a lie since success was always guaranteed, it's just more obvious now). Signed-off-by: Sean Christopherson --- arch/x86/events/intel/lbr.c | 6 +----- arch/x86/include/asm/perf_event.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c index 4f70fb6c2c1e..b8ad31c52cf0 100644 --- a/arch/x86/events/intel/lbr.c +++ b/arch/x86/events/intel/lbr.c @@ -1868,10 +1868,8 @@ void __init intel_pmu_arch_lbr_init(void) * x86_perf_get_lbr - get the LBR records information * * @lbr: the caller's memory to store the LBR records information - * - * Returns: 0 indicates the LBR info has been successfully obtained */ -int x86_perf_get_lbr(struct x86_pmu_lbr *lbr) +void x86_perf_get_lbr(struct x86_pmu_lbr *lbr) { int lbr_fmt =3D x86_pmu.intel_cap.lbr_format; =20 @@ -1879,8 +1877,6 @@ int x86_perf_get_lbr(struct x86_pmu_lbr *lbr) lbr->from =3D x86_pmu.lbr_from; lbr->to =3D x86_pmu.lbr_to; lbr->info =3D (lbr_fmt =3D=3D LBR_FORMAT_INFO) ? x86_pmu.lbr_info : 0; - - return 0; } EXPORT_SYMBOL_GPL(x86_perf_get_lbr); =20 diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_= event.h index f839eb55f298..f6d9230cdfab 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h @@ -528,7 +528,7 @@ extern int x86_perf_rdpmc_index(struct perf_event *even= t); =20 #ifdef CONFIG_CPU_SUP_INTEL extern struct perf_guest_switch_msr *perf_guest_get_msrs(int *nr, void *da= ta); -extern int x86_perf_get_lbr(struct x86_pmu_lbr *lbr); +extern void x86_perf_get_lbr(struct x86_pmu_lbr *lbr); extern void intel_pt_handle_vmx(int on); #endif /* CONFIG_CPU_SUP_INTEL */ =20 --=20 2.37.2.789.g6183377224-goog