qemu/hw/pci
Peter Xu d4e9b75aa0 pcie: simplify pcie_add_capability()
When we add PCIe extended capabilities, we should be following the rule
that we add the head extended cap (at offset 0x100) first, then the rest
of them. Meanwhile, we are always adding new capability bits at the end
of the list. Here the "next" looks meaningless in all cases since it
should always be zero (along with the "header").

Simplify the function a bit, and it looks more readable now.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-02-17 21:52:31 +02:00
..
Makefile.objs
msi.c
msix.c pci: Convert msix_init() to Error and fix callers 2017-02-01 03:37:18 +02:00
pci_bridge.c
pci_host.c
pci-stub.c
pci.c pci: mark ROMs read-only 2017-02-01 03:37:17 +02:00
pcie_aer.c
pcie_host.c
pcie_port.c
pcie.c pcie: simplify pcie_add_capability() 2017-02-17 21:52:31 +02:00
shpc.c migration: extend VMStateInfo 2017-01-24 17:54:47 +00:00
slotid_cap.c
trace-events