Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362298
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v11] cpufreq: powernv: Add sysfs attributes to show throttle stats |
| Date | 2016-03-22 03:50 +0100 |
| Message-ID | <rfkyl-6nt-1@gated-at.bofh.it> (permalink) |
| References | <rfbv7-j7-65@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 21-03-16, 22:29, Shilpasri G Bhat wrote:
> + 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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v11] cpufreq: powernv: Add sysfs attributes to show throttle stats Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> - 2016-03-21 18:10 +0100 Re: [PATCH v11] cpufreq: powernv: Add sysfs attributes to show throttle stats Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-22 03:50 +0100
csiph-web