diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-06-15 02:58:26 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-09-23 20:04:24 -0400 |
commit | 79f5599772ac2f138d7a75b8f3f06a93f09c75f7 (patch) | |
tree | 092c9f6e3f7c49d8f5bb9f3d39752ae7cfb9415a /drivers/net | |
parent | a724eada8c2a7b62463b73ccf73fd0bb6e928aeb (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/net')
-rw-r--r-- | drivers/net/sfc/efx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 07a7e4b8f8fc..cc4b2f99989d 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -884,13 +884,12 @@ static int efx_wanted_rx_queues(void) | |||
884 | int count; | 884 | int count; |
885 | int cpu; | 885 | int cpu; |
886 | 886 | ||
887 | if (unlikely(!alloc_cpumask_var(&core_mask, GFP_KERNEL))) { | 887 | if (unlikely(!zalloc_cpumask_var(&core_mask, GFP_KERNEL))) { |
888 | printk(KERN_WARNING | 888 | printk(KERN_WARNING |
889 | "sfc: RSS disabled due to allocation failure\n"); | 889 | "sfc: RSS disabled due to allocation failure\n"); |
890 | return 1; | 890 | return 1; |
891 | } | 891 | } |
892 | 892 | ||
893 | cpumask_clear(core_mask); | ||
894 | count = 0; | 893 | count = 0; |
895 | for_each_online_cpu(cpu) { | 894 | for_each_online_cpu(cpu) { |
896 | if (!cpumask_test_cpu(cpu, core_mask)) { | 895 | if (!cpumask_test_cpu(cpu, core_mask)) { |