On Wed, Sep 07, 2011 at 05:05:58PM +0200, Mark Kettenis wrote:
> > From: Egbert Eich <[email protected]>
> > Date: Wed,  7 Sep 2011 16:44:48 +0200
> > 
> > The mask must not be zero otherwise the matching condition will never
> > be true: ((val & mask) == set).
> 
> > ---
> >  src/common_bridge.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/src/common_bridge.c b/src/common_bridge.c
> > index 871c1f6..aea9435 100644
> > --- a/src/common_bridge.c
> > +++ b/src/common_bridge.c
> > @@ -328,7 +328,7 @@ pci_device_get_parent_bridge(struct pci_device *dev)
> >      struct pci_id_match bridge_match = {
> >          PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
> >          (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_PCI << 8),
> > -        0
> > +        (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_PCI << 8)
> 
> Shouldn't that be:
> 
> -         0
> +         (0xff << 16) | (0xff << 8)
> 
> Unless I'm mistaken with your diff it will spuriously match stuff that
> isn't a PCI bridge either.

Yes, of course, you are right.

Cheers,
        Egbert.

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to