linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: colpatch@us.ibm.com
Cc: "Martin J. Bligh" <mbligh@aracnet.com>,
	Dave Hansen <haveblue@us.ibm.com>,
	Bill Hartner <bhartner@us.ibm.com>,
	Andrew Theurer <habanero@us.ibm.com>,
	Andrew Morton <akpm@zip.com.au>, Robert Love <rml@tech9.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] Re: Bug 619 - sched_best_cpu does not pick best cpu (2/2)
Date: 05 May 2003 19:09:10 -0700	[thread overview]
Message-ID: <1052186950.983.3.camel@rth.ninka.net> (raw)
In-Reply-To: <3EB70FC2.1010903@us.ibm.com>

On Mon, 2003-05-05 at 18:28, Matthew Dobson wrote:
> +#if (BITS_PER_LONG == 64)
> +
> +static inline unsigned int generic_hweight64(unsigned int w)
> +{
> +        unsigned int res = (w & 0x5555555555555555) + ((w >> 1) & 0x5555555555555555);

First, there is no way this works.  unsigned int doesn't
hold 64-bit values on any platform I know of. :-)

The best fix is to use 'u64' here and also to remove the silly
BITS_PER_LONG ifdef, it should always be available even on 32-bit
platforms.

-- 
David S. Miller <davem@redhat.com>

  reply	other threads:[~2003-05-06  4:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-06  1:25 [patch] Re: Bug 619 - sched_best_cpu does not pick best cpu (1/2) Matthew Dobson
2003-05-06  1:28 ` [patch] Re: Bug 619 - sched_best_cpu does not pick best cpu (2/2) Matthew Dobson
2003-05-06  2:09   ` David S. Miller [this message]
2003-05-06 11:06   ` Gabriel Paubert
2003-05-15  1:29 ` [patch] Re: Bug 619 - sched_best_cpu does not pick best cpu (1/1) Andrew Theurer
2003-05-15  1:26   ` Zwane Mwaikambo
2003-05-15  1:48     ` Andrew Theurer

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=1052186950.983.3.camel@rth.ninka.net \
    --to=davem@redhat.com \
    --cc=akpm@zip.com.au \
    --cc=bhartner@us.ibm.com \
    --cc=colpatch@us.ibm.com \
    --cc=habanero@us.ibm.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=rml@tech9.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).