[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4B6FDDA9.4000200@zytor.com>
Date: Mon, 08 Feb 2010 01:47:21 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>, linux-next@...r.kernel.org,
linux-kernel@...r.kernel.org,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH] sched: Fix unused variable warning on UP (was: Re: linux-next:
tip tree build warning)
On 02/07/2010 12:31 PM, Geert Uytterhoeven wrote:
>
> <trying to completely destroy my credibility>
> Shouldn't put_cpu() take a (possibly dummy) `cpu' parameter, as
> returned by get_cpu()?
> </trying>
>
Please tell me that you're joking.
There is absolutely no reason for it, since there is only one CPU that
you can put (the one you're already on.) The only thing that will
happen if you insist on carrying the CPU number forward (unless it is
used anyway) is that the compiler will generate worse code.
get_cpu() returning the CPU you're on is a convenience; it's so you
don't need to do a third operation just to get your current CPU number,
but it could just as easily be done that way.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists