From: Laurent Vivier <lvivier@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/block/onenand: Remove dead code block
Date: Tue, 3 Oct 2017 12:25:54 +0200 [thread overview]
Message-ID: <56ac2027-6aa5-6dc9-f2e3-3de54fe8f230@redhat.com> (raw)
In-Reply-To: <1507024644-14853-1-git-send-email-thuth@redhat.com>
On 03/10/2017 11:57, Thomas Huth wrote:
> The condition of the for-loop makes sure that b is always smaller
> than s->blocks, so the "if (b >= s->blocks)" statement is completely
> superfluous here.
>
> Buglink: https://bugs.launchpad.net/qemu/+bug/1715007
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> hw/block/onenand.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/hw/block/onenand.c b/hw/block/onenand.c
> index 30e40f3..de65c9e 100644
> --- a/hw/block/onenand.c
> +++ b/hw/block/onenand.c
> @@ -520,10 +520,6 @@ static void onenand_command(OneNANDState *s)
> s->intstatus |= ONEN_INT;
>
> for (b = 0; b < s->blocks; b ++) {
> - if (b >= s->blocks) {
> - s->status |= ONEN_ERR_CMD;
> - break;
> - }
> if (s->blockwp[b] == ONEN_LOCK_LOCKTIGHTEN)
> break;
>
>
Looks like a bad cut'n'paste from case 0x23.
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
next prev parent reply other threads:[~2017-10-03 10:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 9:57 [Qemu-devel] [PATCH] hw/block/onenand: Remove dead code block Thomas Huth
2017-10-03 10:25 ` Laurent Vivier [this message]
2017-10-04 15:10 ` [Qemu-devel] [Qemu-trivial] " Kevin Wolf
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=56ac2027-6aa5-6dc9-f2e3-3de54fe8f230@redhat.com \
--to=lvivier@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=thuth@redhat.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).