* [PATCH] cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0)
@ 2013-05-13 8:03 Wei Yongjun
2013-05-13 8:19 ` Viresh Kumar
2013-05-13 14:44 ` Dirk Brandewie
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-05-13 8:03 UTC (permalink / raw)
To: rjw, viresh.kumar; +Cc: yongjun_wei, cpufreq, linux-pm
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>
---
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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0)
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
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2013-05-13 8:19 UTC (permalink / raw)
To: Wei Yongjun; +Cc: rjw, yongjun_wei, cpufreq, linux-pm
On 13 May 2013 13:33, Wei Yongjun <weiyj.lk@gmail.com> 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>
> ---
> 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)
>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0)
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
1 sibling, 0 replies; 3+ messages in thread
From: Dirk Brandewie @ 2013-05-13 14:44 UTC (permalink / raw)
To: Wei Yongjun
Cc: rjw, viresh.kumar, yongjun_wei, cpufreq, linux-pm, dirk.brandewie
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-13 14:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).