From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 1/9] Add cpu idle pwr mgmt to xen Date: Wed, 30 Apr 2008 09:54:15 +0100 Message-ID: References: <48183A3F.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48183A3F.76E4.0078.0@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 , Gang Wei Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 30/4/08 08:22, "Jan Beulich" wrote: >>>> "Wei, Gang" 30.04.08 05:27 >>> >> Revising done according to Jan's comments. Resend. > > Thanks. Unfortunately you now use a static (but not per-CPU) variable - > while I understand that it is expected that the call is done just once, I > don't think this is a good thing to do. Why is the variable even non-local? Is it just to make the xlat_malloc*() interfaces simpler? It's a false simplification if so, and I think you'd be better making the variable an explicit parameter to those functions. Also I agree with Jan regarding non-ISO C usage of loop-header variable declarations (don't do it) and also you should check copy_from_guest*() return values and return -EFAULT where appropriate. His comment regarding explicit padding or use of uint32_t in your public bitfield also sounds good to me. -- Keir