All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] - prof_cpu_mask problems
Date: Sun, 16 Nov 2003 21:25:13 +0000	[thread overview]
Message-ID: <marc-linux-ia64-106901866501139@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106901123527791@msgid-missing>

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

  reply	other threads:[~2003-11-16 21:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-16 19:30 [PATCH] - prof_cpu_mask problems Jack Steiner
2003-11-16 21:25 ` Matthew Wilcox [this message]
2003-11-17 17:16 ` Luck, Tony
2003-11-17 17:30 ` Matthew Wilcox
2003-11-19 21:45 ` Paul Jackson
2003-11-19 22:54 ` William Lee Irwin III
2003-11-20  2:17 ` Paul Jackson
2003-11-20  2:38 ` Paul Jackson
2003-11-20  2:47 ` William Lee Irwin III
2003-11-20  2:59 ` Paul Jackson
2003-11-20  4:47 ` Paul Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-106901866501139@msgid-missing \
    --to=willy@debian.org \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.