Cao jin <caoj.f...@cn.fujitsu.com> writes: > It has: > 1. More newlines make the code block well separated. > 2. Add more comments for msi_init. > 3. Fix a indentation in vmxnet3.c. > 4. ioh3420 & xio3130_downstream: put PCI Express capability init function > together, make it more readable. > > cc: Dmitry Fleytman <dmi...@daynix.com> > cc: Jason Wang <jasow...@redhat.com> > cc: Michael S. Tsirkin <m...@redhat.com> > cc: Markus Armbruster <arm...@redhat.com> > cc: Marcel Apfelbaum <mar...@redhat.com> > > Reviewed-by: Marcel Apfelbaum <mar...@redhat.com> > Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> [...] > diff --git a/hw/pci/msi.c b/hw/pci/msi.c > index e0e64c2..97f35c0 100644 > --- a/hw/pci/msi.c > +++ b/hw/pci/msi.c > @@ -165,6 +165,23 @@ bool msi_enabled(const PCIDevice *dev) > PCI_MSI_FLAGS_ENABLE); > } > > +/* > + * Make PCI device @dev MSI-capable. > + * Non-zero @offset puts capability MSI at that offset in PCI config > + * space. > + * @nr_vectors is the number of MSI vectors (1, 2, 4, 8, 16 or 32). > + * 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. > + * @errp is for returning errors.
@errp only appears in PATCH 11. The easiest fix is to add this comment only then. > + * Return the offset of capability MSI in config space on success, > + * set @errp and return -errno on error. > + * > + * -ENOTSUP means lacking msi support for a msi-capable platform. > + * -EINVAL means capability overlap, happens when @offset is non-zero, > + * also means a programming error, except device assignment, which can check > + * if a real HW is broken. > + */ > int msi_init(struct PCIDevice *dev, uint8_t offset, > unsigned int nr_vectors, bool msi64bit, bool > msi_per_vector_mask) > {