From: Stefan Weil <sw@weilnetz.de>
To: Sameeh Jubran <sameeh@daynix.com>,
qemu-devel@nongnu.org, Jason Wang <jasowang@redhat.com>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>, Yan Vugenfirer <yan@daynix.com>
Subject: Re: [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement
Date: Sun, 29 May 2016 08:44:02 +0200 [thread overview]
Message-ID: <574A8FB2.6080602@weilnetz.de> (raw)
In-Reply-To: <1464503845-29545-1-git-send-email-sameeh@daynix.com>
[-- 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 --]
next prev parent reply other threads:[~2016-05-29 6:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-29 6:37 [Qemu-devel] [PATCH] e1000: Removing unnecessary if statement Sameeh Jubran
2016-05-29 6:44 ` Stefan Weil [this message]
2016-05-29 8:42 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=574A8FB2.6080602@weilnetz.de \
--to=sw@weilnetz.de \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sameeh@daynix.com \
--cc=yan@daynix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).