From patchwork Mon Jul 29 14:00:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 262801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 91BFF2C00CD for ; Tue, 30 Jul 2013 00:39:13 +1000 (EST) Received: from localhost ([::1]:54743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3o3f-0002ON-4N for incoming@patchwork.ozlabs.org; Mon, 29 Jul 2013 10:04:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3nzh-0005i1-V9 for qemu-devel@nongnu.org; Mon, 29 Jul 2013 10:00:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3nzW-0003A5-O4 for qemu-devel@nongnu.org; Mon, 29 Jul 2013 10:00:13 -0400 Received: from e06smtp18.uk.ibm.com ([195.75.94.114]:48993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3nzW-000354-Dq for qemu-devel@nongnu.org; Mon, 29 Jul 2013 10:00:02 -0400 Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 29 Jul 2013 14:53:46 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp18.uk.ibm.com (192.168.101.148) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 29 Jul 2013 14:53:43 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id CE93E17D805C for ; Mon, 29 Jul 2013 15:01:41 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6TDxkZn47448150 for ; Mon, 29 Jul 2013 13:59:46 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r6TDxvPi005304 for ; Mon, 29 Jul 2013 07:59:57 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r6TDxvxP005296; Mon, 29 Jul 2013 07:59:57 -0600 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id 3CF90122443A; Mon, 29 Jul 2013 15:59:57 +0200 (CEST) From: Christian Borntraeger To: qemu-devel Developers Date: Mon, 29 Jul 2013 16:00:17 +0200 Message-Id: <1375106418-22828-8-git-send-email-borntraeger@de.ibm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1375106418-22828-1-git-send-email-borntraeger@de.ibm.com> References: <1375092324-23943-1-git-send-email-agraf@suse.de> <1375106418-22828-1-git-send-email-borntraeger@de.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13072913-6892-0000-0000-000005D3D6C2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.114 Cc: aliguori@us.ibm.com, Thomas Huth , Alexander Graf , Christian Borntraeger , Jens Freimann , cornelia.huck@de.ibm.com Subject: [Qemu-devel] [PATCH 7/8] s390x/kvm: Remove redundant return code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Thomas Huth Removed the redundant return code statement from handle_instruction() - it always returned 0 and never reports any errors to its caller, since errors from the sub-functions are already reported via program exceptions instead. Signed-off-by: Thomas Huth Signed-off-by: Christian Borntraeger --- target-s390x/kvm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index a7b845d..960b3cf 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -693,7 +693,7 @@ out: return 0; } -static int handle_instruction(S390CPU *cpu, struct kvm_run *run) +static void handle_instruction(S390CPU *cpu, struct kvm_run *run) { unsigned int ipa0 = (run->s390_sieic.ipa & 0xff00); uint8_t ipa1 = run->s390_sieic.ipa & 0x00ff; @@ -718,7 +718,6 @@ static int handle_instruction(S390CPU *cpu, struct kvm_run *run) if (r < 0) { enter_pgmcheck(cpu, 0x0001); } - return 0; } static bool is_special_wait_psw(CPUState *cs) @@ -738,7 +737,7 @@ static int handle_intercept(S390CPU *cpu) (long)cs->kvm_run->psw_addr); switch (icpt_code) { case ICPT_INSTRUCTION: - r = handle_instruction(cpu, run); + handle_instruction(cpu, run); break; case ICPT_WAITPSW: /* disabled wait, since enabled wait is handled in kernel */