From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH] x86/mmuext: Unify okay/rc error handling in do_mmuext_op() Date: Mon, 21 Dec 2015 12:50:43 -0500 Message-ID: <56783BF3.4040909@oracle.com> References: <1450718160-744-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1450718160-744-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Xen-devel Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org On 12/21/2015 12:16 PM, Andrew Cooper wrote: > c/s 506db90 "x86/HVM: merge HVM and PVH hypercall tables" introduced a path > whereby 'okay' was used uninitialised, with broke compilation on CentOS 7. > > Splitting the error handling like this is fragile and unnecessary. Drop the > okay variable entirely and just use rc directly, substituting rc = -EINVAL/0 > for okay = 0/1. > > In addition, two error messages are updated to print rc, and some stray > whitespace is dropped. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Boris Ostrovsky Reviewed-by: Boris Ostrovsky with a couple of style nits: > @@ -3258,14 +3254,14 @@ long do_mmuext_op( > > break; > } > - > + > case MMUEXT_TLB_FLUSH_LOCAL: > if ( likely(d == pg_owner) ) > flush_tlb_local(); > else > rc = -EPERM; > break; > - > + > case MMUEXT_INVLPG_LOCAL: > if ( unlikely(d != pg_owner) ) > rc = -EPERM; These look like stray changes.