From patchwork Wed May 4 13:04:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 9013941 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 885919F30C for ; Wed, 4 May 2016 13:05:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F334F203A4 for ; Wed, 4 May 2016 13:05:32 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 45BCE20392 for ; Wed, 4 May 2016 13:05:32 +0000 (UTC) Received: from localhost ([::1]:47861 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axwUa-0002FM-7w for patchwork-qemu-devel@patchwork.kernel.org; Wed, 04 May 2016 09:05:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axwUA-0001lC-N5 for qemu-devel@nongnu.org; Wed, 04 May 2016 09:05:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axwTp-0004No-22 for qemu-devel@nongnu.org; Wed, 04 May 2016 09:04:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axwTo-0004K4-TG; Wed, 04 May 2016 09:04:40 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 46381800A8; Wed, 4 May 2016 13:04:24 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-112-28.ams2.redhat.com [10.36.112.28]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u44D4Fac002315; Wed, 4 May 2016 09:04:22 -0400 From: Laurent Vivier To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Wed, 4 May 2016 15:04:08 +0200 Message-Id: <1462367048-20997-4-git-send-email-lvivier@redhat.com> In-Reply-To: <1462367048-20997-1-git-send-email-lvivier@redhat.com> References: <1462367048-20997-1-git-send-email-lvivier@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/3] remove useless muldiv64() 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: Laurent Vivier , Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP muldiv64(a, 1, b) is like "a / b". This patch is the result of coccinelle script scripts/coccinelle/remove_muldiv64.cocci. Signed-off-by: Laurent Vivier --- hw/usb/hcd-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index e5b535f..2af6c16 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -1474,7 +1474,7 @@ static uint32_t ohci_get_frame_remaining(OHCIState *ohci) if (tks >= usb_frame_time) return (ohci->frt << 31); - tks = muldiv64(tks, 1, usb_bit_time); + tks = tks / usb_bit_time; fr = (uint16_t)(ohci->fi - tks); return (ohci->frt << 31) | fr;