From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS8J6-00020A-Aw for qemu-devel@nongnu.org; Thu, 02 Jun 2011 09:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QS8J1-0005AN-M1 for qemu-devel@nongnu.org; Thu, 02 Jun 2011 09:51:27 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:44278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS8J1-0005AF-AC for qemu-devel@nongnu.org; Thu, 02 Jun 2011 09:51:23 -0400 Received: by pxi15 with SMTP id 15so602871pxi.33 for ; Thu, 02 Jun 2011 06:51:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <60dd6cb1f888183df83a2d6b6b98e17c5991a093.1307014902.git.quintela@redhat.com> References: <60dd6cb1f888183df83a2d6b6b98e17c5991a093.1307014902.git.quintela@redhat.com> Date: Thu, 2 Jun 2011 14:51:21 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 11/14] linux-user: fpu_save_addr is not used List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On 2 June 2011 12:53, Juan Quintela wrote: > It is only read to set the error code? > =C2=A0 =C2=A0 =C2=A0 =C2=A0 err |=3D __get_user(fpu_save_addr, &sf->fpu_s= ave); > - > + =C2=A0 =C2=A0 =C2=A0 =C2=A0(void)fpu_save_addr; In linux-user __get_user can never generate an error: faults are always caught by the lock_user_struct() or equivalent call done beforehand. The error handling is I think a leftover from code borrowed from the kernel (which does have a __get_user that might return an error). So I think the correct fix here is just to remove the __get_user lines and the variables if they're not used. -- PMM