From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/4] KVM: MMU: Clean up the error handling of walk_addr_generic() Date: Sun, 12 Jun 2011 18:45:34 +0300 Message-ID: <4DF4DF1E.3020403@redhat.com> References: <20110609225949.91cce4a0.takuya.yoshikawa@gmail.com> <20110609230126.145e8029.takuya.yoshikawa@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp, mingo@elte.hu To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29414 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752366Ab1FLPps (ORCPT ); Sun, 12 Jun 2011 11:45:48 -0400 In-Reply-To: <20110609230126.145e8029.takuya.yoshikawa@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/09/2011 05:01 PM, Takuya Yoshikawa wrote: > From: Takuya Yoshikawa > > Avoid two step jumps to the error handling part. This eliminates the > use of the variables present and rsvd_fault. > > We also mark the variables write/user/fetch_fault with const to show > these do not change in the function. > > These were suggested by Ingo Molnar. > error: > - walker->fault.vector = PF_VECTOR; > - walker->fault.error_code_valid = true; > - walker->fault.error_code = 0; > - if (present) > - walker->fault.error_code |= PFERR_PRESENT_MASK; > - > - walker->fault.error_code |= write_fault | user_fault; > - > + errcode |= write_fault | user_fault; > if (fetch_fault&& mmu->nx) > - walker->fault.error_code |= PFERR_FETCH_MASK; > - if (rsvd_fault) > - walker->fault.error_code |= PFERR_RSVD_MASK; > + errcode |= PFERR_FETCH_MASK; > This area has changed, please regenerate against 'next'. -- error compiling committee.c: too many arguments to function