Skip to content

Commit

Permalink
perf/x86/amd: Remove unused variable 'hwc'
Browse files Browse the repository at this point in the history
'hwc' is never used in amd_pmu_enable_all(), so remove it.

Signed-off-by: Zucheng Zheng <zhengzucheng@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220421111031.174698-1-zhengzucheng@huawei.com
  • Loading branch information
Zucheng Zheng authored and Peter Zijlstra committed May 12, 2022
1 parent 9cb23f5 commit bc469dd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/events/amd/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bc469dd

Please sign in to comment.