qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement
       [not found] <1464503845-29545-1-git-send-email-sameeh@daynix.com>
@ 2016-05-29  6:44 ` Stefan Weil
  2016-05-29  8:42   ` [Qemu-trivial] " Michael Tokarev
  0 siblings, 1 reply; 2+ 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] 2+ messages in thread

* Re: [Qemu-trivial] [PATCH] e1000: Removing unnecessary if statement
  2016-05-29  6:44 ` [Qemu-trivial] [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement Stefan Weil
@ 2016-05-29  8:42   ` Michael Tokarev
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Tokarev @ 2016-05-29  8:42 UTC (permalink / raw)
  To: Stefan Weil, Sameeh Jubran, qemu-devel, Jason Wang
  Cc: QEMU Trivial, Yan Vugenfirer

Applied to -trivial, thanks!

/mjt


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-29  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1464503845-29545-1-git-send-email-sameeh@daynix.com>
2016-05-29  6:44 ` [Qemu-trivial] [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement Stefan Weil
2016-05-29  8:42   ` [Qemu-trivial] " 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).