From 4a4ff4c58fd750cde01c8b15d30d038cefc90a42 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 23 Mar 2018 15:32:02 +0100 Subject: Remove unnecessary variables for function return value Re-run Coccinelle script scripts/coccinelle/return_directly.cocci Signed-off-by: Laurent Vivier ppc part Acked-by: David Gibson Signed-off-by: Michael Tokarev --- hw/net/ftgmac100.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'hw/net') diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index 704f452067..3300e8ef4a 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -511,7 +511,6 @@ static uint32_t ftgmac100_rxpoll(FTGMAC100State *s) uint32_t cnt = 1024 * FTGMAC100_APTC_RXPOLL_CNT(s->aptcr); uint32_t speed = (s->maccr & FTGMAC100_MACCR_FAST_MODE) ? 1 : 0; - uint32_t period; if (s->aptcr & FTGMAC100_APTC_RXPOLL_TIME_SEL) { cnt <<= 4; @@ -521,9 +520,7 @@ static uint32_t ftgmac100_rxpoll(FTGMAC100State *s) speed = 2; } - period = cnt / div[speed]; - - return period; + return cnt / div[speed]; } static void ftgmac100_reset(DeviceState *d) -- cgit v1.2.3