From: Laurent Vivier <lvivier@redhat.com>
To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 3/3] remove useless muldiv64()
Date: Wed, 4 May 2016 15:04:08 +0200 [thread overview]
Message-ID: <1462367048-20997-4-git-send-email-lvivier@redhat.com> (raw)
In-Reply-To: <1462367048-20997-1-git-send-email-lvivier@redhat.com>
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 <lvivier@redhat.com>
---
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;
--
2.5.5
next prev parent reply other threads:[~2016-05-04 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 13:04 [Qemu-devel] [PATCH 0/3] muldiv64() trivial fixes Laurent Vivier
2016-05-04 13:04 ` [Qemu-devel] [PATCH 1/3] scripts: add muldiv64() checking coccinelle scripts Laurent Vivier
2016-05-04 13:04 ` [Qemu-devel] [PATCH 2/3] The only 64bit parameter of muldiv64() is the first one Laurent Vivier
2016-05-04 13:04 ` Laurent Vivier [this message]
2016-05-04 18:12 ` [Qemu-devel] [PATCH 0/3] muldiv64() trivial fixes Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462367048-20997-4-git-send-email-lvivier@redhat.com \
--to=lvivier@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).