Re: [PATCH 00/13] Refactor pci_is_brdige() to simplify code

From: Yijing Wang
Date: Fri Apr 25 2014 - 22:51:21 EST


On 2014/4/25 17:42, David Laight wrote:
> From: Yijing Wang
>> This patchset rename the current pci_is_bridge() to pci_has_subordinate(),
>> and introduce a new pci_is_bridge() which determine pci bridge by check
>> dev->hdr_type. The new one is more accurate. PCIe Spec define the pci
>> device is a bridge by the dev->hdr_type = 0x01 || 0x02.
>
> That is a dangerous rename and is likely to cause difficult to

Hi David,
I renamed pci_is_bridge() to pci_has_subordinate() because

static inline bool pci_is_bridge(struct pci_dev *pci_dev)
{
return !!(pci_dev->subordinate);
}

which always check dev->subordinate.

> identify bugs in any code you've missed.

What are you referring to ?


Thanks!
Yijing.






>
> David
>
> ï{.nï+ïïïïïïï+%ïïlzwmïïbïëïïrïïzXïïïwïï{ayïÊÚï,jïïfïïïhïïïzïïwïïï ïïïj:+vïïïwïjïmïïïïïïïïzZ+ïïïïïÝj"ïï!ïiOïïzïïvï^ïmïïïï nÆïïY&ï
>


--
Thanks!
Yijing

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/