All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Brandewie <dirk.brandewie@gmail.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: rjw@sisk.pl, viresh.kumar@linaro.org,
	yongjun_wei@trendmicro.com.cn, cpufreq@vger.kernel.org,
	linux-pm@vger.kernel.org, dirk.brandewie@gmail.com
Subject: Re: [PATCH] cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0)
Date: Mon, 13 May 2013 07:44:49 -0700	[thread overview]
Message-ID: <5190FC61.8090709@gmail.com> (raw)
In-Reply-To: <CAPgLHd9Z99KvdBghVqr++9G5eBx5hKA13LmPUpc=K_X3N+uhiQ@mail.gmail.com>

On 05/13/2013 01:03 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Use vzalloc() instead of vmalloc() and memset(0).
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com>

> ---
>   drivers/cpufreq/intel_pstate.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index cc3a8e6..f59aecb 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -788,10 +788,9 @@ static int __init intel_pstate_init(void)
>
>   	pr_info("Intel P-state driver initializing.\n");
>
> -	all_cpu_data = vmalloc(sizeof(void *) * num_possible_cpus());
> +	all_cpu_data = vzalloc(sizeof(void *) * num_possible_cpus());
>   	if (!all_cpu_data)
>   		return -ENOMEM;
> -	memset(all_cpu_data, 0, sizeof(void *) * num_possible_cpus());
>
>   	rc = cpufreq_register_driver(&intel_pstate_driver);
>   	if (rc)
>
> --
> To unsubscribe from this list: send the line "unsubscribe cpufreq" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


      parent reply	other threads:[~2013-05-13 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13  8:03 [PATCH] cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0) Wei Yongjun
2013-05-13  8:19 ` Viresh Kumar
2013-05-13 14:44 ` Dirk Brandewie [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=5190FC61.8090709@gmail.com \
    --to=dirk.brandewie@gmail.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=viresh.kumar@linaro.org \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.