All of lore.kernel.org
 help / color / mirror / Atom feed
From: SeokYeon Hwang <syeon.hwang@samsung.com>
To: 'Markus Armbruster' <armbru@redhat.com>
Cc: kongjianjun@gmail.com, paolo.bonzini@gmail.com,
	qemu-devel@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong
Date: Mon, 10 Nov 2014 21:57:52 +0900	[thread overview]
Message-ID: <00bc01cffce5$f08f7ec0$d1ae7c40$@samsung.com> (raw)
In-Reply-To: <87389rxuxa.fsf@blackfin.pond.sub.org>

> -----Original Message-----
> From: Markus Armbruster [mailto:armbru@redhat.com]
> Sent: Monday, November 10, 2014 6:33 PM
> To: SeokYeon Hwang
> Cc: qemu-devel@nongnu.org; kongjianjun@gmail.com; paolo.bonzini@gmail.com;
> mreitz@redhat.com
> Subject: Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an
> os_errno is wrong
> 
> SeokYeon Hwang <syeon.hwang@samsung.com> writes:
> 
> > Added 'assert(os_errno > 0)' in 'error_set_errno()'.
> > Fixed errno since it passes wrong value to 'error_set_errno()'.
> >
> > Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
> > ---
> >  hw/pci/pcie.c | 2 +-
> >  util/error.c  | 1 +
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 58455bd..2902f7d
> > 100644
> > --- a/hw/pci/pcie.c
> > +++ b/hw/pci/pcie.c
> > @@ -229,7 +229,7 @@ static void pcie_cap_slot_hotplug_common(PCIDevice
> *hotplug_dev,
> >          /* the slot is electromechanically locked.
> >           * This error is propagated up to qdev and then to HMP/QMP.
> >           */
> > -        error_setg_errno(errp, -EBUSY, "slot is electromechanically
> locked");
> > +        error_setg_errno(errp, EBUSY, "slot is electromechanically
> > + locked");
> >      }
> >  }
> >
> > diff --git a/util/error.c b/util/error.c index 2ace0d8..6c9d995 100644
> > --- a/util/error.c
> > +++ b/util/error.c
> > @@ -62,6 +62,7 @@ void error_set_errno(Error **errp, int os_errno,
> ErrorClass err_class,
> >          return;
> >      }
> >      assert(*errp == NULL);
> > +    assert(os_errno >= 0);
> >
> >      err = g_malloc0(sizeof(*err));
> 
> The first hunk could still go into 2.2 as a bug fix.  The rest can't.
> You could post just the first hunk as "[PATCH for-2.2] pci: Don't pass
> negative errno to error_set_errno()", with my R-by.
> 
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Did you mean separate this patch into two patches ??
One is "PATCH v4" and the other is "PATCH for-2.2". Am I right??

And I have a question. (I don't know review / merge process well.)
What happens to the "reviewed" but "not bug-fix" patch during "feature
freeze" time ??

Thanks.

  reply	other threads:[~2014-11-10 12:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10  5:54 [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong SeokYeon Hwang
2014-11-10  6:32 ` Amos Kong
2014-11-10  8:36 ` Max Reitz
2014-11-10  9:32 ` Markus Armbruster
2014-11-10 12:57   ` SeokYeon Hwang [this message]
2014-11-10 13:20     ` Markus Armbruster
2014-11-12  7:09       ` SeokYeon Hwang
2014-11-10 16:14 ` Eric Blake
2014-11-12  7:00   ` SeokYeon Hwang

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='00bc01cffce5$f08f7ec0$d1ae7c40$@samsung.com' \
    --to=syeon.hwang@samsung.com \
    --cc=armbru@redhat.com \
    --cc=kongjianjun@gmail.com \
    --cc=mreitz@redhat.com \
    --cc=paolo.bonzini@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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.