From patchwork Sun Jun 5 07:43:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 9155535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 49EB060467 for ; Sun, 5 Jun 2016 12:37:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 299C527D07 for ; Sun, 5 Jun 2016 12:37:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BCBF281DB; Sun, 5 Jun 2016 12:37:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8D45327D07 for ; Sun, 5 Jun 2016 12:37:36 +0000 (UTC) Received: from localhost ([::1]:36952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9XJ9-0003Hf-Nx for patchwork-qemu-devel@patchwork.kernel.org; Sun, 05 Jun 2016 08:37:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9XDW-0007Ku-1j for qemu-devel@nongnu.org; Sun, 05 Jun 2016 08:31:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9XDK-0001xv-6r for qemu-devel@nongnu.org; Sun, 05 Jun 2016 08:31:46 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:42888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9XDJ-0001wZ-Ux; Sun, 05 Jun 2016 08:31:34 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id BF65D40929; Sun, 5 Jun 2016 15:31:30 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 81EC0AFA; Sun, 5 Jun 2016 10:43:37 +0300 (MSK) Received: (nullmailer pid 1143 invoked by uid 1000); Sun, 05 Jun 2016 07:43:32 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Sun, 5 Jun 2016 10:43:03 +0300 Message-Id: <6142c08db8aec2a8a7ad58e8d406857de69894cc.1465112552.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 26/52] e1000: Removing unnecessary if statement 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: qemu-trivial@nongnu.org, Michael Tokarev , Sameeh Jubran Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sameeh Jubran Since mit_delay can never be 0 this if statement is superfluous. Signed-off-by: Sameeh Jubran Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/net/e1000.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 36e3dbe..1202371 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -311,11 +311,9 @@ set_interrupt_cause(E1000State *s, int index, uint32_t val) */ mit_delay = (mit_delay < 500) ? 500 : mit_delay; - if (mit_delay) { - s->mit_timer_on = 1; - timer_mod(s->mit_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + - mit_delay * 256); - } + s->mit_timer_on = 1; + timer_mod(s->mit_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + + mit_delay * 256); s->mit_ide = 0; } }