[libvirt] [PATCH 2/4] util: Slightly refactor PCI list functions
jd >> Jiri Denemark
jdenemar at redhat.com
Tue Dec 4 18:13:28 UTC 2012
On Tue, Dec 04, 2012 at 22:32:35 +0800, Osier Yang wrote:
> On 2012年12月04日 18:38, Jiri Denemark wrote:
> > In order to be able to steal PCI device by its index in the list.
> > ---
> > src/libvirt_private.syms | 2 ++
> > src/util/pci.c | 60 +++++++++++++++++++++++++++++-------------------
> > src/util/pci.h | 4 ++++
> > 3 files changed, 42 insertions(+), 24 deletions(-)
> >
> > diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
> > index 41e2629..625490f 100644
> > --- a/src/libvirt_private.syms
> > +++ b/src/libvirt_private.syms
> > @@ -1000,10 +1000,12 @@ pciDeviceListAdd;
> > pciDeviceListCount;
> > pciDeviceListDel;
> > pciDeviceListFind;
> > +pciDeviceListFindIndex;
> > pciDeviceListFree;
> > pciDeviceListGet;
> > pciDeviceListNew;
> > pciDeviceListSteal;
>
> After looking through all the 4 patches, I see there is no use
> of pciDeviceListFindIndex. Personally I'd like change it to
> static.
Right, it's not used outside pci.c, however it might be potentially useful and
the result is definitely easier to review than a patch that would also move
pciDeviceListFindIndex code several functions up so that it can be made static
:-) However, I agree with adding an additional check in
pciDeviceListStealIndex.
Jirka
More information about the libvir-list
mailing list