RE: [tip:x86/cpu] x86, cpu: intel_cacheinfo.c: use cpumask_first(to_cpumask())

From: Langsdorf, Mark
Date: Wed Mar 18 2009 - 18:03:42 EST


Thanks!

> -----Original Message-----
> From: H. Peter Anvin [mailto:hpa@xxxxxxxxxxxxxxx]
> Sent: Wednesday, March 18, 2009 4:43 PM
> To: linux-tip-commits@xxxxxxxxxxxxxxx
> Cc: hpa@xxxxxxxxx; mingo@xxxxxxxxxx; Langsdorf, Mark;
> tglx@xxxxxxxxxxxxx; hpa@xxxxxxxxxxxxxxx
> Subject: [tip:x86/cpu] x86, cpu: intel_cacheinfo.c: use
> cpumask_first(to_cpumask())
>
> Commit-ID: d42c33ef0a236c6874c748438500c78edfaa1187
> Gitweb:
> http://git.kernel.org/tip/d42c33ef0a236c6874c748438500c78edfaa1187
> Author: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
> AuthorDate: Wed, 18 Mar 2009 14:36:02 -0700
> Committer: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
> CommitDate: Wed, 18 Mar 2009 14:38:36 -0700
>
> x86, cpu: intel_cacheinfo.c: use cpumask_first(to_cpumask())
>
> Impact: fix warning and possible UP build failure
>
> Instead of using first_cpu() on a raw bitmask, use
> cpumask_first(to_cpumask()).
>
> Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
> Cc: Mark Langsdorf <mark.langsdorf@xxxxxxx>
>
>
> ---
> arch/x86/kernel/cpu/intel_cacheinfo.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c
> b/arch/x86/kernel/cpu/intel_cacheinfo.c
> index b728325..6f4d2a3 100644
> --- a/arch/x86/kernel/cpu/intel_cacheinfo.c
> +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
> @@ -643,7 +643,8 @@ static ssize_t show_##file_name
> \
> static ssize_t show_cache_disable(struct _cpuid4_info
> *this_leaf, char *buf,
> unsigned int index)
> {
> - int node = cpu_to_node(first_cpu(this_leaf->shared_cpu_map));
> + int cpu = cpumask_first(to_cpumask(this_leaf->shared_cpu_map));
> + int node = cpu_to_node(cpu);
> struct pci_dev *dev = k8_northbridges[node];
> unsigned int reg = 0;
>
> @@ -665,7 +666,8 @@ static ssize_t
> store_cache_disable(struct _cpuid4_info *this_leaf, const char *buf,
> size_t count, unsigned int index)
> {
> - int node = cpu_to_node(first_cpu(this_leaf->shared_cpu_map));
> + int cpu = cpumask_first(to_cpumask(this_leaf->shared_cpu_map));
> + int node = cpu_to_node(cpu);
> struct pci_dev *dev = k8_northbridges[node];
> unsigned long val = 0;
> unsigned int scrubber = 0;
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/