public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] sched: Fix unused variable warning on UP (was: Re: 	linux-next: tip tree build warning)
Date: Mon, 08 Feb 2010 01:47:21 -0800	[thread overview]
Message-ID: <4B6FDDA9.4000200@zytor.com> (raw)
In-Reply-To: <10f740e81002071231j6977c6c7ie3f9e82bd0170f21@mail.gmail.com>

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

      parent reply	other threads:[~2010-02-08  9:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-07 19:57 [PATCH] sched: Fix unused variable warning on UP (was: Re: linux-next: tip tree build warning) Geert Uytterhoeven
2010-02-07 19:58 ` Peter Zijlstra
2010-02-07 20:26   ` Geert Uytterhoeven
2010-02-07 20:31     ` Geert Uytterhoeven
2010-02-08  8:32       ` Andrew Morton
2010-02-08  9:47       ` H. Peter Anvin [this message]

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=4B6FDDA9.4000200@zytor.com \
    --to=hpa@zytor.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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