From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnkGv-0000Au-Bs for qemu-devel@nongnu.org; Mon, 10 Nov 2014 03:24:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnkGo-0002Bf-P0 for qemu-devel@nongnu.org; Mon, 10 Nov 2014 03:24:25 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:59720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnkGo-0002BM-GE for qemu-devel@nongnu.org; Mon, 10 Nov 2014 03:24:18 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NET00KXFE0FRKB0@mailout4.samsung.com> for qemu-devel@nongnu.org; Mon, 10 Nov 2014 17:24:15 +0900 (KST) From: SeokYeon Hwang References: <1415182311-13799-1-git-send-email-syeon.hwang@samsung.com> <20141105124609.GA4354@redhat.com> <87lhnpn5y1.fsf@blackfin.pond.sub.org> <545A23A7.7090401@redhat.com> <20141105132815.GA4884@redhat.com> <545A3A61.50001@redhat.com> <045901cff969$02203060$06609120$@samsung.com> <20141106092355.GA15186@redhat.com> <077901cffa41$cd7467d0$685d3770$@samsung.com> <87h9ybfo8p.fsf@blackfin.pond.sub.org> In-reply-to: <87h9ybfo8p.fsf@blackfin.pond.sub.org> Date: Mon, 10 Nov 2014 17:24:23 +0900 Message-id: <001a01cffcbf$bbc27470$33475d50$@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] pci: fixed mismatch of error-handling between pci_qdev_init() and qdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Markus Armbruster' Cc: 'Paolo Bonzini' , qemu-devel@nongnu.org, "'Michael S. Tsirkin'" > -----Original Message----- > From: Markus Armbruster [mailto:armbru@redhat.com] > Sent: Friday, November 07, 2014 4:45 PM > To: SeokYeon Hwang > Cc: 'Michael S. Tsirkin'; 'Paolo Bonzini'; qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PATCH] pci: fixed mismatch of error-handling > between pci_qdev_init() and qdev > > SeokYeon Hwang writes: > > [...] > > But if 2.2 comes with all "realized" devices, if there is no "init" > > devices, then this patch isn't needed. > > No PCI devices will be converted to realize in 2.2. We'll start the > conversion early in the 2.3 development cycle. Whether we can finish it > in the same cycle is uncertain. Then... I think 'pci_qdev_init()' should be fixed because it contains obviously wrong logic. I didn't understand why this problem should be ignored now for reasons of it will be removed in the far future. (or because all devices that use this function didn't return positive value as error now.) It will be corrected by 1. return '-1' instead of 'rc'. 2. check 'rc < 0' instead of 'rc != 0'. (if we can guarantee no pci device returns positive value as error.) What do you think about it ?? If I didn't understand the context of this thread, please let me know. Thank you very much.