From: Zucheng Zheng Date: Thu, 21 Apr 2022 11:10:31 +0000 (+0800) Subject: perf/x86/amd: Remove unused variable 'hwc' X-Git-Tag: v5.19-rc1~205^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc469ddf67154a4840267132e87ce0d8b72d4952;p=thirdparty%2Fkernel%2Flinux.git perf/x86/amd: Remove unused variable 'hwc' 'hwc' is never used in amd_pmu_enable_all(), so remove it. Signed-off-by: Zucheng Zheng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220421111031.174698-1-zhengzucheng@huawei.com --- diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c index 262e39a850316..d81eac2284ead 100644 --- a/arch/x86/events/amd/core.c +++ b/arch/x86/events/amd/core.c @@ -771,14 +771,11 @@ static void amd_pmu_enable_event(struct perf_event *event) static void amd_pmu_enable_all(int added) { struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); - struct hw_perf_event *hwc; int idx; amd_brs_enable_all(); for (idx = 0; idx < x86_pmu.num_counters; idx++) { - hwc = &cpuc->events[idx]->hw; - /* only activate events which are marked as active */ if (!test_bit(idx, cpuc->active_mask)) continue;