[libvirt] [PATCH] Fix the ACS checking in the PCI code.
eblake at redhat.com
Wed Jul 28 22:04:23 UTC 2010
On 07/28/2010 03:07 PM, Chris Lalancette wrote:
> However, the code to find the parent of the device had a
> much too relaxed check. It would iterate through all PCI
> devices on the system, looking for a device that had a range
> of busses that included the current device's bus.
Stupid English. I'm more used seeing buses than busses, and was about
to call you on it, but
shows both forms as roughly neck-and-neck and dictionary.com lists both
spellings as acceptable plurals.
> This patch is simple in that it looks for the PCI device
> whose secondary device *exactly* equals the bus of the
> device we are looking for. That means that one, and only one
> bridge will be found, and it will be the correct device.
> Note that this also caused a fairly serious bug in the
s/caused/solved/ - the bug was caused by the condition before this
commit, but the commit message is documenting what this particular
commit does for the code base.
> /* No, it's superman! */
> - return (dev->bus >= secondary && dev->bus <= subordinate);
> + return (dev->bus == secondary);
Do we want a comment here in the code to summarize your commit message?
But that's a minor nit, so:
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 619 bytes
Desc: OpenPGP digital signature
More information about the libvir-list