From nobody Mon Feb 9 23:02:56 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1608287391; cv=none; d=zohomail.com; s=zohoarc; b=kNasJTstttZgF85+gUc0xE6ya7AIDAG74tJBfsOavytTb07+B9d10khOow3gqFbCa4T/omCKfilaRbPgItPV6sojQVfxaj42dkTJg9vyoKUcJy8+ITNXLkEmTIpDic3jZ8H0DZrQ068t70lqMDbcNWGWcU35QBrn1DnOMDX56fY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608287391; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AUEbRBikd8YLSJ1RPqxuTNZ75m3UMG8Mk4wOgtCzF/8=; b=ZjvUAGA2GhgoBV7o+Rx87ctyq34i6KHpWxP6UlDeesZ/2+nMSMWhWyjlLlTQEi5Aq0wM+gckMl9gtxDmORBG8mDQLrgcOQefgTYwtm9OvOyqts7zHlcbhhMvhlWFQtw+wBuoUHf/pOSVVpu+RwIzpmVeIBFJJcg8C0Bj0w6C4C4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160828739120899.86719261444944; Fri, 18 Dec 2020 02:29:51 -0800 (PST) Received: from localhost ([::1]:35370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqD1C-0002y6-5A for importer@patchew.org; Fri, 18 Dec 2020 05:29:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqCvu-0002z8-3c for qemu-devel@nongnu.org; Fri, 18 Dec 2020 05:24:22 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:32927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqCvq-00074F-0c for qemu-devel@nongnu.org; Fri, 18 Dec 2020 05:24:21 -0500 Received: from localhost.localdomain ([82.252.144.198]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MS3rB-1kg8pw3gOB-00TUuF; Fri, 18 Dec 2020 11:24:16 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 12/14] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context() Date: Fri, 18 Dec 2020 11:24:05 +0100 Message-Id: <20201218102407.597566-13-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201218102407.597566-1-laurent@vivier.eu> References: <20201218102407.597566-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ZmAq9ybs8O5o28NnMQotEu1ugm4XdPERtwd950RO8gEeC4I8rcD YUcRpcQiQFywXZkcukoicbqYh/sHIk7diteQmJWrCs5UbCdqpezSibVoO3UI460FULRuoqC 6O/fZriYmLZ4x8Wz8D09JT1oLEDTmUkVtRKcaxNYLFHYhYHOkb+O5RkU68WfN78VeUXQdMT zMEyMnHoFxsOptUK/pKVQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:ztmoiu/l2bA=:KI5SRkyExS5Sv0iD3WzIDW R7f+Yi/8EqmncTKNUovIAqI2nvbkpqqfEiswX2Ufew77C6mGS7MgjKJetZvKTlaZ432um/480 rvtJGU1x1lzW9JAk5xauJi/hrnnY3z+AzZKkH7Nzhw3DEicE9yLQYjFpZG7e3lnB/6eaENnBq PCAwyQetCEv54j6KIx/keN4PkUvEFj6g7+coTFSNk9ubzWSmWdk43qQGyNZSWX1OLmPoxsjJ0 r3aEeNgWh5TAasdkDfWWh5svg+YMfBJuG/gzoz0TuKQHELZwjHILbv6LWCnqVZYFEpxqrfMHh ZusrLZ6br+Qp/uBD3nP3GPqOdKNA7iqWvqG7laZ/3BXCD3PwFJKA6XlmU6DGv5T4wR1brbkog Sz0l8it6kYEcotG59GJYX/C8s7xM+rc/f6PN4pJP82R2yLfhzweZImQEVndtMcXUzXBYlaMcW 2csR2wsDbw== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.17.24; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Richard Henderson , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Peter Maydell Unlike the kernel macros, our __get_user() and __put_user() do not return a failure code. Kernel code typically has a style of err |=3D __get_user(...); err |=3D __get_user(...); and then checking err at the end. In sparc64_get_context() our version of the code dropped the accumulating into err but left the "if (err) goto do_sigsegv" checks, which will never be taken. Delete unnecessary if()s. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20201106152738.26026-3-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/signal.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 0057b48fad93..58b48afe29c9 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/signal.c @@ -555,8 +555,6 @@ void sparc64_get_context(CPUSPARCState *env) for (i =3D 0; i < TARGET_NSIG_WORDS; i++, dst++, src++) { __put_user(*src, dst); } - if (err) - goto do_sigsegv; } =20 /* XXX: tstate must be saved properly */ @@ -598,8 +596,6 @@ void sparc64_get_context(CPUSPARCState *env) * hidden behind an "if (fenab)" where fenab is always 0). */ =20 - if (err) - goto do_sigsegv; unlock_user_struct(ucp, ucp_addr, 1); return; do_sigsegv: --=20 2.29.2