aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-06-15 02:58:26 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-09-23 20:04:24 -0400
commit79f5599772ac2f138d7a75b8f3f06a93f09c75f7 (patch)
tree092c9f6e3f7c49d8f5bb9f3d39752ae7cfb9415a /drivers/acpi
parenta724eada8c2a7b62463b73ccf73fd0bb6e928aeb (diff)
cpumask: use zalloc_cpumask_var() where possible
Remove open-coded zalloc_cpumask_var() and zalloc_cpumask_var_node(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_perflib.c3
-rw-r--r--drivers/acpi/processor_throttling.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 11088cf10319..8ba0ed0b9ddb 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -511,7 +511,7 @@ int acpi_processor_preregister_performance(
511 struct acpi_processor *match_pr; 511 struct acpi_processor *match_pr;
512 struct acpi_psd_package *match_pdomain; 512 struct acpi_psd_package *match_pdomain;
513 513
514 if (!alloc_cpumask_var(&covered_cpus, GFP_KERNEL)) 514 if (!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))
515 return -ENOMEM; 515 return -ENOMEM;
516 516
517 mutex_lock(&performance_mutex); 517 mutex_lock(&performance_mutex);
@@ -558,7 +558,6 @@ int acpi_processor_preregister_performance(
558 * Now that we have _PSD data from all CPUs, lets setup P-state 558 * Now that we have _PSD data from all CPUs, lets setup P-state
559 * domain info. 559 * domain info.
560 */ 560 */
561 cpumask_clear(covered_cpus);
562 for_each_possible_cpu(i) { 561 for_each_possible_cpu(i) {
563 pr = per_cpu(processors, i); 562 pr = per_cpu(processors, i);
564 if (!pr) 563 if (!pr)
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index ce7cf3bc5101..4c6c14c1e307 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -77,7 +77,7 @@ static int acpi_processor_update_tsd_coord(void)
77 struct acpi_tsd_package *pdomain, *match_pdomain; 77 struct acpi_tsd_package *pdomain, *match_pdomain;
78 struct acpi_processor_throttling *pthrottling, *match_pthrottling; 78 struct acpi_processor_throttling *pthrottling, *match_pthrottling;
79 79
80 if (!alloc_cpumask_var(&covered_cpus, GFP_KERNEL)) 80 if (!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))
81 return -ENOMEM; 81 return -ENOMEM;
82 82
83 /* 83 /*
@@ -105,7 +105,6 @@ static int acpi_processor_update_tsd_coord(void)
105 if (retval) 105 if (retval)
106 goto err_ret; 106 goto err_ret;
107 107
108 cpumask_clear(covered_cpus);
109 for_each_possible_cpu(i) { 108 for_each_possible_cpu(i) {
110 pr = per_cpu(processors, i); 109 pr = per_cpu(processors, i);
111 if (!pr) 110 if (!pr)