linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	ego@linux.vnet.ibm.com, linux-pm@vger.kernel.org,
	rjw@rjwysocki.net, shreyas@linux.vnet.ibm.com,
	linux-api@vger.kernel.org
Subject: Re: [PATCH v11] cpufreq: powernv: Add sysfs attributes to show throttle stats
Date: Tue, 22 Mar 2016 08:16:27 +0530	[thread overview]
Message-ID: <20160322024627.GP27778@vireshk-i7> (raw)
In-Reply-To: <1458579591-27573-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com>

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

      reply	other threads:[~2016-03-22  2:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 16:59 [PATCH v11] cpufreq: powernv: Add sysfs attributes to show throttle stats Shilpasri G Bhat
2016-03-22  2:46 ` Viresh Kumar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160322024627.GP27778@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=rjw@rjwysocki.net \
    --cc=shilpa.bhat@linux.vnet.ibm.com \
    --cc=shreyas@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).