From: Alexander Graf <agraf@suse.de>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, Stuart Yoder <stuart.yoder@freescale.com>
Subject: Re: [PATCH] PPC: use CURRENT_THREAD_INFO instead of open coded assembly
Date: Mon, 2 Jul 2012 23:34:21 +0200 [thread overview]
Message-ID: <23F3EB4C-799C-41EF-BAB8-360DF220FC62@suse.de> (raw)
In-Reply-To: <4FF21343.20408@freescale.com>
On 02.07.2012, at 23:31, Scott Wood wrote:
> On 07/02/2012 04:27 PM, Alexander Graf wrote:
>>=20
>> On 02.07.2012, at 23:26, Benjamin Herrenschmidt wrote:
>>=20
>>> On Mon, 2012-07-02 at 22:59 +0200, Alexander Graf wrote:
>>>> This should go into an #ifdef __ASSEMBLY__ block, right? :)
>>>=20
>>> We almost never use #ifdef __ASSEMBLY__, we use it the other way
>>> around, to prevent C stuff from being included in assembly. The
>>> other way around is legit since things might be used in inline asm
>>> for example.
>>=20
>> I'm not sure I want to see this bit of code used as is in inline asm
>> :). I don't even think it's possible, since it's a full statement.
>> Either way, it's safer with the guard.
>=20
> Safer from what? It won't be expanded unless referenced. How is this
> better than putting ifdefs on #includes, prototypes, struct =
definitions,
> etc.? The ifdef is just clutter.
Well, it'd make it easier to read the errors resulting of it. Calling =
CURRENT_THREAD_INFO from within C code would throw random compiler =
errors at you that are quite unintelligible, while a missing definition =
would be a reasonably obvious thing to fix, no?
Either way, not married to this. I just find it cleaner to not expose =
something as a define that wouldn't work in the first place.
Alex
prev parent reply other threads:[~2012-07-02 21:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 20:56 [PATCH] PPC: use CURRENT_THREAD_INFO instead of open coded assembly Stuart Yoder
2012-07-02 20:59 ` Alexander Graf
2012-07-02 21:26 ` Benjamin Herrenschmidt
2012-07-02 21:27 ` Alexander Graf
2012-07-02 21:31 ` Scott Wood
2012-07-02 21:34 ` Alexander Graf [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=23F3EB4C-799C-41EF-BAB8-360DF220FC62@suse.de \
--to=agraf@suse.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=scottwood@freescale.com \
--cc=stuart.yoder@freescale.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;
as well as URLs for NNTP newsgroup(s).