From nobody Tue Feb 10 00:59:32 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 ARC-Seal: i=1; a=rsa-sha256; t=1579887717; cv=none; d=zohomail.com; s=zohoarc; b=UqLqC9nqR9GdaAV7uFtzn+qPkPDB4P8sqGSK8k+aJlpb1A6Ijelsap5h4bwE7c3VRxbHnpIWkr/ZDZe1x8GCycljeNBh7SRoJLeuDHlaqQ5NcVZDjjgAYqQstYiSTtcPnjIW68WhR+K5N7YKdZN96tmp2fHwVNFvvsTzuunqca4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579887717; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=fJTeWySs7jls7yPHoxfJEk49N6R7xVYTPt6M795bLiE=; b=N/j7dbtFWDoglvg4f4jtTEjWkjGGoZkrQqcweb1t+qql0TrNP9oD0MGFg9WlothwUq2H3aZhe8ggRxYZQLvVtwEBZZzad7HUy5nwM2JWIYHJWDd8mtrHTYG98UzR6jnSQBpcQY69tmUmPLnG5wGMiTyITlSfMZl/jooqEd09HOE= 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 1579887717090303.6231472734901; Fri, 24 Jan 2020 09:41:57 -0800 (PST) Received: from localhost ([::1]:45836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv2xv-0005CY-7R for importer@patchew.org; Fri, 24 Jan 2020 12:41:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57118) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv2x3-0003fM-89 for qemu-devel@nongnu.org; Fri, 24 Jan 2020 12:41:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iv2x1-0001hD-Mm for qemu-devel@nongnu.org; Fri, 24 Jan 2020 12:41:01 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:38458 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 1iv2x1-0001ek-Ba for qemu-devel@nongnu.org; Fri, 24 Jan 2020 12:40:59 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 92B961A212D; Fri, 24 Jan 2020 18:40:55 +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 5F58A1A2131; Fri, 24 Jan 2020 18:40:55 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PULL 3/7] mips-semi.c: remove 'uhi_done' label in helper_do_semihosting() Date: Fri, 24 Jan 2020 18:40:42 +0100 Message-Id: <1579887646-5949-4-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579887646-5949-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1579887646-5949-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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, 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 Signed-off-by: Daniel Henrique Barboza Reviewed-by: Aleksandar Markovic 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