* [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement
@ 2016-05-29 6:37 Sameeh Jubran
2016-05-29 6:44 ` Stefan Weil
0 siblings, 1 reply; 3+ messages in thread
From: Sameeh Jubran @ 2016-05-29 6:37 UTC (permalink / raw)
To: qemu-devel, Jason Wang; +Cc: Dmitry Fleytman, Yan Vugenfirer
Since mit_delay can never be 0 this if statement is
superfluous.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
---
hw/net/e1000.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 8e79b55..eb903a9 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -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;
}
}
--
2.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement
2016-05-29 6:37 [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement Sameeh Jubran
@ 2016-05-29 6:44 ` Stefan Weil
2016-05-29 8:42 ` Michael Tokarev
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2016-05-29 6:44 UTC (permalink / raw)
To: Sameeh Jubran, qemu-devel, Jason Wang; +Cc: QEMU Trivial, Yan Vugenfirer
[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]
Am 29.05.2016 um 08:37 schrieb Sameeh Jubran:
> Since mit_delay can never be 0 this if statement is
> superfluous.
>
> Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
> ---
> hw/net/e1000.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/hw/net/e1000.c b/hw/net/e1000.c
> index 8e79b55..eb903a9 100644
> --- a/hw/net/e1000.c
> +++ b/hw/net/e1000.c
> @@ -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;
> }
> }
Reviewed-by: Stefan Weil <sw@weilnetz.de>
CC'ing qemu-trivial
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-29 8:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-29 6:37 [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement Sameeh Jubran
2016-05-29 6:44 ` Stefan Weil
2016-05-29 8:42 ` Michael Tokarev
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).