aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuukka Tikkanen <tuukka.tikkanen@linaro.org>2015-01-02 09:56:43 +0200
committerTuukka Tikkanen <tuukka.tikkanen@linaro.org>2015-01-02 09:58:51 +0200
commitb79e6862b1bd258fb05ba7205fde98fea261664d (patch)
tree376c3567648a4ec4df1be0b460c7bc90d9cf5992
parent46a63275690ae8f0d49558f032752b747ec4ee48 (diff)
Idlestat: Remove unused function cluster_data()
The function cluster_data() has no callers, remove it. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
-rw-r--r--idlestat.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/idlestat.c b/idlestat.c
index bcaf122..f9fe6b4 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -1005,75 +1005,6 @@ struct cpuidle_datas *idlestat_load(const char *filename)
return ptrerror(NULL);
}
-struct cpuidle_datas *cluster_data(struct cpuidle_datas *datas)
-{
- struct cpuidle_cstate *c1, *cstates, *tmp;
- struct cpuidle_datas *result;
- int i, j;
- int cstate_max = -1;
-
- result = calloc(sizeof(*result), 1);
- if (!result)
- return NULL;
-
- result->nrcpus = -1; /* the cluster */
- result->pstates = NULL;
- result->cstates = calloc(sizeof(*result->cstates), 1);
- if (!result->cstates) {
- free(result);
- return NULL;
- }
-
- /* hack but negligible overhead */
- for (i = 0; i < datas->nrcpus; i++)
- cstate_max = MAX(cstate_max, datas->cstates[i].cstate_max);
- result->cstates[0].cstate_max = cstate_max;
-
- for (i = 0; i < cstate_max + 1; i++) {
-
- for (j = 0, cstates = NULL; j < datas->nrcpus; j++) {
-
- c1 = &datas->cstates[j].cstate[i];
-
- tmp = inter(cstates, c1);
- if (cstates && cstates != tmp &&
- cstates->inter_result) {
- free(cstates->data);
- free(cstates);
- }
- cstates = tmp;
-
- if (!cstates)
- continue;
- if (is_err(cstates)) {
- release_cstate_info(result->cstates, 1);
- free(result);
- return ptrerror(NULL);
- }
- }
-
- /* copy state names from the first cpu */
- cstates->name = strdup(datas->cstates[0].cstate[i].name);
-
- result->cstates[0].cstate[i] = *cstates;
- result->cstates[0].cstate[i].inter_result = 0;
-
- /*
- * Free cstates if it has been allocated by inter()
- * Do not free things pointed to by members of cstates
- * even if you free cstates itself.
- */
- if (cstates && cstates->inter_result) {
- free(cstates);
- } else {
- fprintf(stderr, "Warning: %s aliased cstates at %p\n",
- __func__, cstates);
- }
- }
-
- return result;
-}
-
struct cpuidle_cstates *core_cluster_data(struct cpu_core *s_core)
{
struct cpuidle_cstate *c1, *cstates, *tmp;