From nobody Sun Apr 12 00:31:08 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 457B1C19F2D for ; Wed, 3 Aug 2022 19:27:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238571AbiHCT1T (ORCPT ); Wed, 3 Aug 2022 15:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238301AbiHCT1J (ORCPT ); Wed, 3 Aug 2022 15:27:09 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EF715727A for ; Wed, 3 Aug 2022 12:27:08 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id s6-20020a17090a764600b001f551416ef5so797813pjl.4 for ; Wed, 03 Aug 2022 12:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:reply-to:from:to:cc; bh=M8ovGhzxNi7TT4QpXAtpoUmOo1wqUNy+ycPxrvboNqY=; b=PmTq74m3OAW+mdBUVHtZuRyPSZSQFiucZ6qIpbJfNFw8tuNx4AenCOZ4GC10Wvedux I6LtTBvTGanR9V0VSYyixRM+IFhE6rlu8kWOjOaOGZDwNmAJxceo0Km4DPAXg4H2E1rT mup74jwLSded8usdiM3BOpiType/StEUkhnhfDwlD1E7SoUwM3ejy2SWmj6aKOBV2XfH UbqBldM5ZdtkNHELr9Q8QJWBzLqxnWESbugkfAkvuzFaXq88g93ChcmNBJXiK9oWvh/9 y1tWycthZEzuxuRPOIAIvlmvxqngWvuaUzMNOgJngA9NKq2H2KkIYOw7u48fGmz/AFCk YsJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc; bh=M8ovGhzxNi7TT4QpXAtpoUmOo1wqUNy+ycPxrvboNqY=; b=FEGf06wu71C9mxgHpPC8RHTrbxPK3zL/oqT9zu7oBuYFgI/4y98MlDdoEmyj2ijfIX 3sv2MrhBZ14uEmnXca9ajQcCuwkORdPHgcenxZ/yqZ1LLUNFjUNecnzQJrjuKlBbt491 j+HKTBFD4dESktW77rlbECQSdRamnD2qtuOoF7pvW9kCvu1+z1n6t42TquJ3lxhGCMab F1BqWF/bnO2hjSrOe7cT/UYkZQ1zdP8Y7Fval83V+QxxzyDU5MKjzv/E0arq+8CQy7SE 11UELJr26xFAWHcs3dczXN6JyPFzeYQc4RWUzZUgT0cUiexa6zgQqkhR8aSrr+7DWqPC Prhg== X-Gm-Message-State: ACgBeo3FPCd7hL0P2NYTu3ckb6+Rw9WPULhu9VeD3p+HF8OjywOVHjGp uR7nYzZflZY4NOuHtmhmaSdPDGlT8AY= X-Google-Smtp-Source: AA6agR62hcM0a/MWqBP3Ttz5aODILaJxPENcv1VXOYqSYQh+MQec1dO1rNpqdChbUfAtNZP3d/fSILQAdZ4= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:4c8d:b0:1f5:29ef:4a36 with SMTP id my13-20020a17090b4c8d00b001f529ef4a36mr6536897pjb.127.1659554827779; Wed, 03 Aug 2022 12:27:07 -0700 (PDT) Reply-To: Sean Christopherson Date: Wed, 3 Aug 2022 19:26:54 +0000 In-Reply-To: <20220803192658.860033-1-seanjc@google.com> Message-Id: <20220803192658.860033-4-seanjc@google.com> Mime-Version: 1.0 References: <20220803192658.860033-1-seanjc@google.com> X-Mailer: git-send-email 2.37.1.559.g78731f0fdb-goog Subject: [PATCH v2 3/7] 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 aba196172500..102fd3ad4605 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h @@ -512,7 +512,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.1.559.g78731f0fdb-goog