From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] kvm: Make init_rmode_tss() return 0 on success. Date: Sat, 20 Sep 2014 01:44:41 +0200 Message-ID: <20140919234440.GA2501@potion.redhat.com> References: <1410867505-5941-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <1410867505-5941-1-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2014-09-16 13:38+0200, Paolo Bonzini: > In init_rmode_tss(), there two variables indicating the return > value, r and ret, and it return 0 on error, 1 on success. The functio= n > is only called by vmx_set_tss_addr(), and r is redundant. >=20 > This patch removes the redundant variable, by making init_rmode_tss() > return 0 on success, -errno on failure. Which is going to propagate all the way to userpace through ioctl ... is this change of A[PB]I acceptable? Otherwise, -EFAULT seems to match unlikely problems better than -ENOMEM= , so if it is acceptable: Reviewed-by: Radim Kr=C4=8Dm=C3=A1=C5=99