From nobody Mon Feb 9 08:58:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510327362773712.2056730022368; Fri, 10 Nov 2017 07:22:42 -0800 (PST) Received: from localhost ([::1]:42218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDB8d-0000CQ-Pv for importer@patchew.org; Fri, 10 Nov 2017 10:22:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDB6v-0007WZ-LP for qemu-devel@nongnu.org; Fri, 10 Nov 2017 10:20:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDB6r-0005K7-In for qemu-devel@nongnu.org; Fri, 10 Nov 2017 10:20:49 -0500 Received: from 1.mo68.mail-out.ovh.net ([46.105.41.146]:36909) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eDB6r-0005HJ-D0 for qemu-devel@nongnu.org; Fri, 10 Nov 2017 10:20:45 -0500 Received: from player737.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 18A289A3D6 for ; Fri, 10 Nov 2017 16:20:44 +0100 (CET) Received: from zorba.kaod.org.com (deibp9eh1--blueice1n7.emea.ibm.com [195.212.29.161]) (Authenticated sender: clg@kaod.org) by player737.ha.ovh.net (Postfix) with ESMTPSA id B1C26E008C; Fri, 10 Nov 2017 16:20:36 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson , Greg Kurz , Benjamin Herrenschmidt Date: Fri, 10 Nov 2017 15:20:08 +0000 Message-Id: <20171110152017.24324-3-clg@kaod.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171110152017.24324-1-clg@kaod.org> References: <20171110152017.24324-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 14108651733340687187 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedttddrieefgdejgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.105.41.146 Subject: [Qemu-devel] [PATCH for-2.12 v3 02/11] ppc/xics: remove useless if condition X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The previous code section uses a 'first < 0' test and returns. Therefore, there is no need to test the 'first' variable against '>=3D 0' afterwards. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz --- hw/intc/xics_spapr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c index d98ea8b13068..e8c0a1b3e903 100644 --- a/hw/intc/xics_spapr.c +++ b/hw/intc/xics_spapr.c @@ -329,10 +329,8 @@ int spapr_ics_alloc_block(ICSState *ics, int num, bool= lsi, return -1; } =20 - if (first >=3D 0) { - for (i =3D first; i < first + num; ++i) { - ics_set_irq_type(ics, i, lsi); - } + for (i =3D first; i < first + num; ++i) { + ics_set_irq_type(ics, i, lsi); } first +=3D ics->offset; =20 --=20 2.13.6