e1000: Removing unnecessary if statement
PATCH 1/1 e1000: Removing unnecessary if statement
Since mit_delay can never be 0 this if statement is superfluous.
Signed-off-by Sameeh Jubran <[email protected]>
--- hw/net/e1000.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
hw/net/e1000.c +3 -5
@@ -365,11 +365,9 @@ set_interrupt_cause(E1000State *s, int index, uint32_t val)*/ mit_delay = (mit_delay <500 ) ?500 : mit_delay; -if (mit_delay) { - s->mit_timer_on =1 ; -timer_mod (s->mit_timer,qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ) + - mit_delay *256 ); - } + s->mit_timer_on =1 ; +timer_mod (s->mit_timer,qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ) + + mit_delay *256 ); s->mit_ide =0 ; } }
Signature · 1 line
2.5.5
Am 29.05.2016 um 08:37 schrieb Sameeh Jubran:
Quoted 17 lines
Since
mit_delaycan never be 0 this if statement is superfluous.Signed-off-by Sameeh Jubran <[email protected]>--- hw/net/e1000.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)hw/net/e1000.c +0
-1@@ -365,11 +365,9 @@ set_interrupt_cause(E1000State *s, int index, uint32_t val)*/ mit_delay = (mit_delay <500 ) ?500 : mit_delay; -if (mit_delay) {
hw/net/e1000.c set_interrupt_cause(E1000State *s, int index, uint32_t val) · line 373
Quoted 10 lines
hw/net/e1000.c +3
-4- s->mit_timer_on =1 ; -timer_mod (s->mit_timer,qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ) + - mit_delay *256 ); - } + s->mit_timer_on =1 ; +timer_mod (s->mit_timer,qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ) + + mit_delay *256 ); s->mit_ide =0 ; } }
Reviewed-by Stefan Weil <[email protected]>
CC'ing qemu-trivial
Michael Tokarev
AppliedApplied to -trivial, thanks!
/mjt