From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCOKI-0002nY-TT for qemu-devel@nongnu.org; Mon, 13 Jun 2016 05:38:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCOKE-0001Zw-Jp for qemu-devel@nongnu.org; Mon, 13 Jun 2016 05:38:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCOKE-0001Zq-DV for qemu-devel@nongnu.org; Mon, 13 Jun 2016 05:38:30 -0400 References: <1465552478-5540-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1465552478-5540-12-git-send-email-caoj.fnst@cn.fujitsu.com> From: Marcel Apfelbaum Message-ID: <575E7F12.7030509@redhat.com> Date: Mon, 13 Jun 2016 12:38:26 +0300 MIME-Version: 1.0 In-Reply-To: <1465552478-5540-12-git-send-email-caoj.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v8 11/17] msi_init: change return value to 0 on success List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cao jin , qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Paolo Bonzini , Hannes Reinecke , Markus Armbruster On 06/10/2016 12:54 PM, Cao jin wrote: > No caller use its return value as msi capability offset, also in order > to make its return behaviour consistent with msix_init(). > > cc: Michael S. Tsirkin > cc: Paolo Bonzini > cc: Hannes Reinecke > cc: Markus Armbruster > cc: Marcel Apfelbaum > > Acked-by: Hannes Reinecke > Reviewed-by: Markus Armbruster > Signed-off-by: Cao jin > --- > hw/pci/msi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > Hi Hannes, > This version changed, If is ok with you, I will let your A-b still here. > > diff --git a/hw/pci/msi.c b/hw/pci/msi.c > index 359058e..ed79225 100644 > --- a/hw/pci/msi.c > +++ b/hw/pci/msi.c > @@ -173,8 +173,7 @@ bool msi_enabled(const PCIDevice *dev) > * If @msi64bit, make the device capable of sending a 64-bit message > * address. > * If @msi_per_vector_mask, make the device support per-vector masking. > - * Return the offset of capability MSI in config space on success, > - * return -errno on error. > + * Return 0 on success, return -errno on error. > * > * -ENOTSUP means lacking msi support for a msi-capable platform. > * -EINVAL means capability overlap, happens when @offset is non-zero, > @@ -236,7 +235,8 @@ int msi_init(struct PCIDevice *dev, uint8_t offset, > pci_set_long(dev->wmask + msi_mask_off(dev, msi64bit), > 0xffffffff >> (PCI_MSI_VECTORS_MAX - nr_vectors)); > } > - return config_offset; > + > + return 0; > } > > void msi_uninit(struct PCIDevice *dev) > Reviewed-by: Marcel Apfelbaum Thanks, Marcel