All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-trivial] [PATCH] hw/block/onenand: Remove dead code block
Date: Wed, 4 Oct 2017 17:10:09 +0200	[thread overview]
Message-ID: <20171004151009.GC9801@localhost.localdomain> (raw)
In-Reply-To: <56ac2027-6aa5-6dc9-f2e3-3de54fe8f230@redhat.com>

Am 03.10.2017 um 12:25 hat Laurent Vivier geschrieben:
> 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>

Thanks, applied to the block branch.

Kevin


WARNING: multiple messages have this Message-ID (diff)
From: Kevin Wolf <kwolf@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/block/onenand: Remove dead code block
Date: Wed, 4 Oct 2017 17:10:09 +0200	[thread overview]
Message-ID: <20171004151009.GC9801@localhost.localdomain> (raw)
In-Reply-To: <56ac2027-6aa5-6dc9-f2e3-3de54fe8f230@redhat.com>

Am 03.10.2017 um 12:25 hat Laurent Vivier geschrieben:
> 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>

Thanks, applied to the block branch.

Kevin

  reply	other threads:[~2017-10-04 15:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03  9:57 [Qemu-trivial] [PATCH] hw/block/onenand: Remove dead code block Thomas Huth
2017-10-03  9:57 ` [Qemu-devel] " Thomas Huth
2017-10-03 10:25 ` [Qemu-trivial] " Laurent Vivier
2017-10-03 10:25   ` [Qemu-devel] " Laurent Vivier
2017-10-04 15:10   ` Kevin Wolf [this message]
2017-10-04 15:10     ` 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=20171004151009.GC9801@localhost.localdomain \
    --to=kwolf@redhat.com \
    --cc=lvivier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.