aboutsummaryrefslogtreecommitdiff
path: root/hw/net
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/net
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/net')
-rw-r--r--hw/net/ftgmac100.c5
1 files changed, 1 insertions, 4 deletions
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)