Re: [PATCH] - prof_cpu_mask problems

From: Matthew Wilcox <willy_at_debian.org>
Date: 2003-11-17 08:25:13
On Sun, Nov 16, 2003 at 01:30:43PM -0600, Jack Steiner wrote:
> 
> I ran into several problems with the prof_cpu_mask & other
> irq masks.

> -	len = 0;
> -	for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
> -		int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
> +	i = sizeof(cpumask_t)/sizeof(u16);
> +	for (k = 0; k < i; ++k) {
> +		cpus_shift_right(mask, irqmask, 16*(i-k-1));
> +		j = sprintf(page, "%04hx", (u16)cpus_coerce(mask));
>  		len += j;
>  		page += j;
> -		cpus_shift_right(tmp, tmp, 16);

Why u16 rather than u32?  cpumask_t is guaranteed to be a multiple of
4, right?

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Nov 16 16:37:45 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:20 EST