From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiez0-0005W9-5b for qemu-devel@nongnu.org; Wed, 23 Mar 2016 05:21:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aieyu-0000Lr-5O for qemu-devel@nongnu.org; Wed, 23 Mar 2016 05:21:42 -0400 Received: from [59.151.112.132] (port=57351 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aieyt-0000IW-Py for qemu-devel@nongnu.org; Wed, 23 Mar 2016 05:21:36 -0400 References: <1450176195-9066-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1450176195-9066-2-git-send-email-caoj.fnst@cn.fujitsu.com> <87wpplqm3i.fsf@blackfin.pond.sub.org> <56F215C0.60203@cn.fujitsu.com> <87zitpd348.fsf@blackfin.pond.sub.org> From: Cao jin Message-ID: <56F2609C.4040902@cn.fujitsu.com> Date: Wed, 23 Mar 2016 17:23:40 +0800 MIME-Version: 1.0 In-Reply-To: <87zitpd348.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Marcel Apfelbaum , qemu-devel@nongnu.org, mst@redhat.com On 03/23/2016 04:12 PM, Markus Armbruster wrote: > Cao jin writes: > >> >> Really appreciate your review, I just finished reading all the >> comments and discussion. >> >> Seems pci_add_capability2()(commit cd9aa33e introduced) doesn`t follow >> the new error reporting rule(report error while also return error). > > Misunderstanding? > > "Report an error to the user" means error_report() and such. > error_setg() doesn't report to the user, it returns an error object to > the caller. > ah...thanks for correcting me. >> So I am thinking, could we revert commit cd9aa33e, let >> pci_add_capability() return error code and assert when out of pci >> space, and let caller(only assigned device, others could ignore the >> error) handle the error code(new a error object, propagate it) >> >> Hope to hear PCI Maintainer`s advice(So I don`t cc other in this round) > -- Yours Sincerely, Cao jin