mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: joe.korty@ccur.com
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bad definition of cpus_complement
Date: Thu, 28 Aug 2003 20:18:19 +0200	[thread overview]
Message-ID: <16206.18283.555437.70679@gargle.gargle.HOWL> (raw)
In-Reply-To: <20030828155451.GA16156@tsunami.ccur.com>

Joe Korty writes:
 > One of the definitions of cpus_complement is broke.  Also, cpus_complement is
 > the only cpus_* definition which operates in-place rather than in (dst,src)
 > form.  I will submit a patch to convert if there is interest.
 > 
 > Joe
 > 
 > --- include/asm-generic/cpumask_up.h.orig	2003-08-27 06:08:38.000000000 -0400
 > +++ include/asm-generic/cpumask_up.h	2003-08-28 11:45:09.000000000 -0400
 > @@ -28,7 +28,7 @@
 >  
 >  #define cpus_complement(map)						\
 >  	do {								\
 > -		cpus_coerce(map) = !cpus_coerce(map);			\
 > +		cpus_coerce(map) = ~cpus_coerce(map);			\
 >  	} while (0)

Broken how? The value range for a cpumask_t on UP is [0,1],
and ! respects that whereas ~ does not.

  reply	other threads:[~2003-08-28 18:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-28 15:54 Joe Korty
2003-08-28 18:18 ` Mikael Pettersson [this message]
2003-08-28 18:32 ` William Lee Irwin III

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=16206.18283.555437.70679@gargle.gargle.HOWL \
    --to=mikpe@csd.uu.se \
    --cc=akpm@osdl.org \
    --cc=joe.korty@ccur.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®