From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] apic: clean up msr handling Date: Fri, 11 Jun 2010 14:49:39 +0100 Message-ID: References: <4C1259000200007800006290@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C1259000200007800006290@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Christoph Egger Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 11/06/2010 14:40, "Jan Beulich" wrote: >>>> On 11.06.10 at 15:22, Christoph Egger wrote: >> -static inline void write_efer(u64 val) >> -{ >> - this_cpu(efer) = val; >> - wrmsrl(MSR_EFER, val); >> -} >> +#define write_efer(val) do { \ >> + this_cpu(efer) = val; \ >> + wrmsrl(MSR_EFER, val); \ >> +} while(0) > > This isn't a good change imo: You now require all current and future > users of write_efer() to not pass expressions with side effects. > > Also, is doesn't really look like a cleanup to me, more like a > complication. Hm, I didn't spot that one. It's odd since I thought Christoph was changign macros into inlien functions where possible. Maybe he just changes in whichever direction makes his patch bigger? ;-) -- Keir