From nobody Mon Feb 9 17:40:17 2026 Delivered-To: importer@patchew.org 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; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580323101071599.7304344737861; Wed, 29 Jan 2020 10:38:21 -0800 (PST) Received: from localhost ([::1]:50076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwsEG-0003fv-2A for importer@patchew.org; Wed, 29 Jan 2020 13:38:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55219) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwsAq-0006Bl-9M for qemu-devel@nongnu.org; Wed, 29 Jan 2020 13:34:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwsAp-0003pu-5c for qemu-devel@nongnu.org; Wed, 29 Jan 2020 13:34:48 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:33059 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iwsAo-0003mp-Qa for qemu-devel@nongnu.org; Wed, 29 Jan 2020 13:34:47 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 9F7111A1FAE; Wed, 29 Jan 2020 19:34:44 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id 837241A1CEF; Wed, 29 Jan 2020 19:34:44 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PULL 3/6] target/mips: semihosting: Remove 'uhi_done' label in helper_do_semihosting() Date: Wed, 29 Jan 2020 19:34:14 +0100 Message-Id: <1580322857-14331-4-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1580322857-14331-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1580322857-14331-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 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@linaro.org, Aleksandar Rikalo , Daniel Henrique Barboza , Aurelien Jarno , amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Daniel Henrique Barboza The label 'uhi_done' is a simple 'return' call and can be removed for a bit more clarity in the code. CC: Aurelien Jarno CC: Aleksandar Markovic CC: Aleksandar Rikalo Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Daniel Henrique Barboza Message-Id: <20200106182425.20312-7-danielhb413@gmail.com> --- target/mips/mips-semi.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/target/mips/mips-semi.c b/target/mips/mips-semi.c index 35bdfd7..10a710c 100644 --- a/target/mips/mips-semi.c +++ b/target/mips/mips-semi.c @@ -218,7 +218,7 @@ static int copy_argn_to_target(CPUMIPSState *env, int a= rg_num, if (!p) { \ gpr[2] =3D -1; \ gpr[3] =3D EFAULT; \ - goto uhi_done; \ + return; \ } \ } while (0) =20 @@ -228,14 +228,14 @@ static int copy_argn_to_target(CPUMIPSState *env, int= arg_num, if (!p) { \ gpr[2] =3D -1; \ gpr[3] =3D EFAULT; \ - goto uhi_done; \ + return; \ } \ p2 =3D lock_user_string(addr2); \ if (!p2) { \ unlock_user(p, addr, 0); \ gpr[2] =3D -1; \ gpr[3] =3D EFAULT; \ - goto uhi_done; \ + return; \ } \ } while (0) =20 @@ -272,7 +272,7 @@ void helper_do_semihosting(CPUMIPSState *env) if (gpr[4] < 3) { /* ignore closing stdin/stdout/stderr */ gpr[2] =3D 0; - goto uhi_done; + return; } gpr[2] =3D close(gpr[4]); gpr[3] =3D errno_mips(errno); @@ -302,7 +302,7 @@ void helper_do_semihosting(CPUMIPSState *env) gpr[2] =3D fstat(gpr[4], &sbuf); gpr[3] =3D errno_mips(errno); if (gpr[2]) { - goto uhi_done; + return; } gpr[2] =3D copy_stat_to_target(env, &sbuf, gpr[5]); gpr[3] =3D errno_mips(errno); @@ -314,14 +314,14 @@ void helper_do_semihosting(CPUMIPSState *env) case UHI_argnlen: if (gpr[4] >=3D semihosting_get_argc()) { gpr[2] =3D -1; - goto uhi_done; + return; } gpr[2] =3D strlen(semihosting_get_arg(gpr[4])); break; case UHI_argn: if (gpr[4] >=3D semihosting_get_argc()) { gpr[2] =3D -1; - goto uhi_done; + return; } gpr[2] =3D copy_argn_to_target(env, gpr[4], gpr[5]); break; @@ -369,6 +369,5 @@ void helper_do_semihosting(CPUMIPSState *env) fprintf(stderr, "Unknown UHI operation %d\n", op); abort(); } -uhi_done: return; } --=20 2.7.4