On 01/17/2017 07:18 AM, Cao jin wrote: > msix_init() reports errors with error_report(), which is wrong when > it's used in realize(). The same issue was fixed for msi_init() in > commit 1108b2f. In order to make the API change as small as possible, > leave the return value check to later patch. > > For some devices(like e1000e, vmxnet3, nvme) who won't fail because of > msix_init's failure, suppress the error report by passing NULL error > object. > > Bonus: add comment for msix_init. > > CC: Jiri Pirko <[email protected]> > CC: Gerd Hoffmann <[email protected]> > CC: Dmitry Fleytman <[email protected]> > CC: Jason Wang <[email protected]> > CC: Michael S. Tsirkin <[email protected]> > CC: Hannes Reinecke <[email protected]> > CC: Paolo Bonzini <[email protected]> > CC: Alex Williamson <[email protected]> > CC: Markus Armbruster <[email protected]> > CC: Marcel Apfelbaum <[email protected]> > Signed-off-by: Cao jin <[email protected]> > --- > hw/block/nvme.c | 2 +- > hw/misc/ivshmem.c | 8 ++++---- > hw/net/e1000e.c | 2 +- > hw/net/rocker/rocker.c | 4 +++- > hw/net/vmxnet3.c | 2 +- > hw/pci/msix.c | 36 +++++++++++++++++++++++++++++++----- > hw/scsi/megasas.c | 4 +++- > hw/usb/hcd-xhci.c | 4 ++-- > hw/vfio/pci.c | 8 ++++++-- > hw/virtio/virtio-pci.c | 4 ++-- > include/hw/pci/msix.h | 5 +++-- > 11 files changed, 57 insertions(+), 22 deletions(-) > For megasas: Reviewed-by: Hannes Reinecke <[email protected]>
Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking [email protected] +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)
