* Michael S. Tsirkin (mst@xxxxxxxxxx) wrote: > On Tue, Dec 15, 2009 at 07:30:27PM +0100, Alexander Graf wrote: > > To retreive device and vendor ID from a PCI device, we need to read a > > sysfs file. That code is currently hand written at least two times, > > the later patch introducing two more calls. > > > > So let's move that out to a function. > > > > Signed-off-by: Alexander Graf <agraf@xxxxxxx> > > Shouldn't we be using libpci, as we already do > in other places? The main issue is making sure we get the cooked value of vendor and device id (they are invalid in config space for VFs). I looked at this before (w/ the same intention) and concluded it wasn't a benefit (of course, I can't recall why now...re-reading libpci, as long as we force PCI_ACCESS_SYS_BUS_PCI it does the right read). Anyway, this is a simple, nice cleanup. Acked-by: Chris Wright <chrisw@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html