Thread (2 messages) 2 messages, 2 authors, 2016-03-22

Re: [PATCH v11] cpufreq: powernv: Add sysfs attributes to show throttle stats

flat view

From: Viresh Kumar <hidden>
Date: 2016-03-22 02:46:32
Also in: linux-pm, linuxppc-dev, lkml

On 21-03-16, 22:29, Shilpasri G Bhat wrote:
quoted hunk ↗ jump to hunk
+	create_throttle_sysfs = kcalloc(cpu_nr_cores(), sizeof(bool),
+					GFP_KERNEL);
+	if (!create_throttle_sysfs) {
+		kfree(chips);
+		return -ENOMEM;
+	}
+
 	for (i = 0; i < nr_chips; i++) {
 		chips[i].id = chip[i];
 		cpumask_copy(&chips[i].mask, cpumask_of_node(chip[i]));
@@ -582,6 +655,7 @@ static int init_chip_info(void)
 
 static inline void clean_chip_info(void)
 {
+	kfree(create_throttle_sysfs);
 	kfree(chips);
 }
Why do you need this at all?. You can use policy->driver data, isn't
it ?

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help