[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86: fix cache flushing condition in map_pages_to_xen()
On 18/07/2013 06:49, "Jan Beulich" <jbeulich@xxxxxxxx> 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |