[PATCH] kernel: events: core: Remove some unused functions

From: Rickard Strandqvist
Date: Tue Jan 13 2015 - 13:28:24 EST


Removes some functions that are not used anywhere:
perf_cpu_hrtimer_cancel() perf_cgroup_event_cgrp_time()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
---
kernel/events/core.c | 33 ---------------------------------
1 file changed, 33 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 2b02c9f..6287095 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -695,11 +695,6 @@ static inline int is_cgroup_event(struct perf_event *event)
return 0;
}

-static inline u64 perf_cgroup_event_cgrp_time(struct perf_event *event)
-{
- return 0;
-}
-
static inline void update_cgrp_time_from_event(struct perf_event *event)
{
}
@@ -789,34 +784,6 @@ static enum hrtimer_restart perf_cpu_hrtimer_handler(struct hrtimer *hr)
return ret;
}

-/* CPU is going down */
-void perf_cpu_hrtimer_cancel(int cpu)
-{
- struct perf_cpu_context *cpuctx;
- struct pmu *pmu;
- unsigned long flags;
-
- if (WARN_ON(cpu != smp_processor_id()))
- return;
-
- local_irq_save(flags);
-
- rcu_read_lock();
-
- list_for_each_entry_rcu(pmu, &pmus, entry) {
- cpuctx = this_cpu_ptr(pmu->pmu_cpu_context);
-
- if (pmu->task_ctx_nr == perf_sw_context)
- continue;
-
- hrtimer_cancel(&cpuctx->hrtimer);
- }
-
- rcu_read_unlock();
-
- local_irq_restore(flags);
-}
-
static void __perf_cpu_hrtimer_init(struct perf_cpu_context *cpuctx, int cpu)
{
struct hrtimer *hr = &cpuctx->hrtimer;
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/