public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Paul Jackson <pj@sgi.com>
Cc: linux-kernel@vger.kernel.org, ioe-lkml@rameria.de
Subject: Re: [PATCH] another minor bit of cpumask cleanup
Date: Sun, 21 Dec 2003 22:47:45 -0800	[thread overview]
Message-ID: <20031221224745.268db46d.akpm@osdl.org> (raw)
In-Reply-To: <20031221180044.0f27eca1.pj@sgi.com>

Paul Jackson <pj@sgi.com> wrote:
>
> Ingo Oeser pointed out to me in private email that one of the cpumask
> macros was broken - the macro for for_each_online_cpu() starts its loop
> with _any_ cpu from the provided mask, and only worries about restricting
> itself to _online_ cpus when looping to the next cpu:
> 
> include/linux/cpumask.h:
> > #define for_each_online_cpu(cpu, map)                                   \
> >         for (cpu = first_cpu_const(mk_cpumask_const(map));              \
> >                 cpu < NR_CPUS;                                          \
> >                 cpu = next_online_cpu(cpu,map))
> 
> Looking further, I see this macro is never used, and its subordinate
> inline macro next_online_cpu() used no where else.  What's more, it's
> redundant.  Calling it with a map of "cpu_online_map" (which you have to
> do, given it's broken thus) is just as good as calling the macro right
> above, "for_each_cpu()", with that same "cpu_online_map". Indeed the
> only uses of "for_each_cpu()", in arch/i386/mach-voyager/voyager_smp.c,
> do pass "cpu_online_map" explicitly, in 5 of 6 calls there from.
> 
> So, having found a piece of code that is broken, redundant and unused,
> I hereby off the following patch to remove it.

Generates rejects for my tree.  I already have three patches which alter
cpumask.h.

Please, hang onto it until we get things synced up a bit more.

  parent reply	other threads:[~2003-12-22  6:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-22  2:00 [PATCH] another minor bit of cpumask cleanup Paul Jackson
2003-12-22  2:14 ` William Lee Irwin III
2003-12-22  6:47 ` Andrew Morton [this message]
2003-12-22  7:19   ` Paul Jackson
2003-12-22  8:57     ` William Lee Irwin III
2003-12-22 12:32       ` Paul Jackson
2003-12-23  1:45     ` Rusty Russell
2003-12-23 10:10       ` Paul Jackson
2003-12-24  1:26         ` Rusty Russell
2003-12-24  3:18           ` Paul Jackson
2003-12-24 10:55             ` 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=20031221224745.268db46d.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=ioe-lkml@rameria.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    /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