提交 bc469ddf 编写于 作者: Z Zucheng Zheng 提交者: Peter Zijlstra

perf/x86/amd: Remove unused variable 'hwc'

'hwc' is never used in amd_pmu_enable_all(), so remove it.
Signed-off-by: NZucheng Zheng <zhengzucheng@huawei.com>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220421111031.174698-1-zhengzucheng@huawei.com
上级 9cb23f59
...@@ -771,14 +771,11 @@ static void amd_pmu_enable_event(struct perf_event *event) ...@@ -771,14 +771,11 @@ static void amd_pmu_enable_event(struct perf_event *event)
static void amd_pmu_enable_all(int added) static void amd_pmu_enable_all(int added)
{ {
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
struct hw_perf_event *hwc;
int idx; int idx;
amd_brs_enable_all(); amd_brs_enable_all();
for (idx = 0; idx < x86_pmu.num_counters; idx++) { for (idx = 0; idx < x86_pmu.num_counters; idx++) {
hwc = &cpuc->events[idx]->hw;
/* only activate events which are marked as active */ /* only activate events which are marked as active */
if (!test_bit(idx, cpuc->active_mask)) if (!test_bit(idx, cpuc->active_mask))
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册