From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoS3v-0002AJ-3i for qemu-devel@nongnu.org; Wed, 12 Nov 2014 02:10:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoS3n-0004o0-SG for qemu-devel@nongnu.org; Wed, 12 Nov 2014 02:09:55 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:14738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoS3n-0004nt-IM for qemu-devel@nongnu.org; Wed, 12 Nov 2014 02:09:47 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEW001NUZW98Y30@mailout2.samsung.com> for qemu-devel@nongnu.org; Wed, 12 Nov 2014 16:09:45 +0900 (KST) From: SeokYeon Hwang References: <1415598889-11244-1-git-send-email-syeon.hwang@samsung.com> <87389rxuxa.fsf@blackfin.pond.sub.org> <00bc01cffce5$f08f7ec0$d1ae7c40$@samsung.com> <87lhnjp4yj.fsf@blackfin.pond.sub.org> In-reply-to: <87lhnjp4yj.fsf@blackfin.pond.sub.org> Date: Wed, 12 Nov 2014 16:09:45 +0900 Message-id: <025501cffe47$a37b3e90$ea71bbb0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-language: ko Subject: Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Markus Armbruster' Cc: kongjianjun@gmail.com, paolo.bonzini@gmail.com, qemu-devel@nongnu.org, mreitz@redhat.com > -----Original Message----- > From: Markus Armbruster [mailto:armbru@redhat.com] > Sent: Monday, November 10, 2014 10:21 PM > To: SeokYeon Hwang > 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 > > SeokYeon Hwang writes: > > >> -----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 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 > >> > --- > >> > 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 > > > > Did you mean separate this patch into two patches ?? > > One is "PATCH v4" and the other is "PATCH for-2.2". Am I right?? > > Yes. > > > 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 ?? > > They get applied when the next development cycle opens. If they don't, > you have to remind the maintainer(s). I just posted separated two patches. Thank you for your advice.