}
for (i = 0; i < state_count; i++)
- strncpy(state[i].desc, drv->states[i].desc, DESC_LEN);
+ strncpy(state[i].desc, drv->states[i].desc, DESC_LEN - 1);
cpu_idle_state = state;
cpu_idle_state_count = state_count;
}
state->id = id;
- strncpy(state->desc, name, DESC_LEN);
+ strncpy(state->desc, name, DESC_LEN - 1);
group_idle_state[group_idle_state_count] = state;
group_idle_state_count++;
}
mode->id = id++;
- strncpy(mode->name, dn->name, NAME_LEN);
+ strncpy(mode->name, dn->name, NAME_LEN - 1);
of_property_read_u32(dn, "target-residency", &mode->target_residency);
of_property_read_u32(dn, "psci-index", &mode->psci_index);
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->band_id = band_id;
- strncpy(__entry->event, event, 64);
+ strncpy(__entry->event, event, 63);
),
TP_printk("comm=%s pid=%d band_id=%d event=%s",
unsigned long max_mips_freq = 0;
int last_state;
+ cpumask_and(cpus, cpus, cpu_possible_mask);
+ if (cpumask_empty(cpus))
+ return;
+
mips = per_cpu(energy_table, cpumask_any(cpus)).mips;
for_each_cpu(cpu, cpus) {
/*