From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86: fix cache flushing condition in map_pages_to_xen()
Date: Thu, 18 Jul 2013 08:37:59 +0100 [thread overview]
Message-ID: <CE0D59E7.587E9%keir.xen@gmail.com> (raw)
In-Reply-To: <51E79013020000780009E906@nat28.tlf.novell.com>
On 18/07/2013 06:49, "Jan Beulich" <jbeulich@suse.com> wrote:
>>> Ugly. I actually picked the same name intentionally.
>>
>> I'm not too strongly opinionated on this one, but it did make me look twice.
>> I think it would be cleaner something like:
>> #define flush_flags(oldf) ({ unsigned int f_ = 0; ...; _f; })
>> ...
>> flush_flags |= flush_flags(...);
>> The 'name collision' I'm fine with, whereas going directly at a caller's
>> variable within a macro is rather grubby behaviour. ;)
>
> But that would still leave the macro access "flags" directly.
Hmmm true. Don't really want to expand the verbiage at each macro call site
any further, so I guess your existing approach is also my preferred one.
> And while I
> realize
> that this is (slightly) odd behavior for a macro, that's precisely the reason
> why
> I #undef it right after the function. Perhaps this could be made even more
> clear
> by moving #define and #undef inside the function...
Yes, that might be slightly preferable.
-- Keir
next prev parent reply other threads:[~2013-07-18 7:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 15:09 [PATCH] x86: fix cache flushing condition in map_pages_to_xen() Jan Beulich
2013-07-17 15:40 ` Andrew Cooper
2013-07-17 16:01 ` Jan Beulich
2013-07-17 16:31 ` Keir Fraser
2013-07-18 5:49 ` Jan Beulich
2013-07-18 7:37 ` Keir Fraser [this message]
2013-07-17 16:31 ` Keir Fraser
2013-07-17 20:41 ` Sander Eikelenboom
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=CE0D59E7.587E9%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).