aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2018-03-23 15:32:02 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2018-05-20 08:48:13 +0300
commit4a4ff4c58fd750cde01c8b15d30d038cefc90a42 (patch)
tree663380d3786b808f7829236f2d085b437d4edb71 /hw/misc
parentf23c81073a4f9aa41a3687161f6ca3d66501a280 (diff)
Remove unnecessary variables for function return value
Re-run Coccinelle script scripts/coccinelle/return_directly.cocci Signed-off-by: Laurent Vivier <lvivier@redhat.com> ppc part Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/mos6522.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 8ad9fc831e..6163cea6ab 100644
--- a/hw/misc/mos6522.c
+++ b/hw/misc/mos6522.c
@@ -176,12 +176,8 @@ static void mos6522_set_sr_int(MOS6522State *s)
static uint64_t mos6522_get_counter_value(MOS6522State *s, MOS6522Timer *ti)
{
- uint64_t d;
-
- d = muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - ti->load_time,
- ti->frequency, NANOSECONDS_PER_SECOND);
-
- return d;
+ return muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - ti->load_time,
+ ti->frequency, NANOSECONDS_PER_SECOND);
}
static uint64_t mos6522_get_load_time(MOS6522State *s, MOS6522Timer *ti)