libxl: stop setting 'vdevfn' in pci_struct_fill()
authorPaul Durrant <pdurrant@amazon.com>
Tue, 5 Jan 2021 17:46:38 +0000 (17:46 +0000)
committerWei Liu <wl@xen.org>
Thu, 21 Jan 2021 15:20:40 +0000 (15:20 +0000)
commitd473d74af381fd7086b5b9ca405a67735a41cc79
tree6ee2a5a90433a95847e55dd5d89270ddb3888580
parentbdc0799fe26ab066f47fb026148aa93e95b262f6
libxl: stop setting 'vdevfn' in pci_struct_fill()

There are only two call-sites. One always sets it to 0 (which is unnecessary
as the structure is already initialized to zero) and the other can simply set
the 'vdevfn' field directly (after proper structure initialization), avoiding
the need for a local variable.

A subsequent patch will also make use of pci_struct_fill() in a context
where 'vdevfn' may already have been set.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libs/light/libxl_pci.c