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

Yijing Wang
2014-04-26T02:49:24Z

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
>
> \x04ï¿½{.nï¿½+ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½+%ï¿½ï¿½lzwmï¿½ï¿½bï¿½ë§²ï¿½ï¿½rï¿½ï¿½zXï¿½ï¿½\x19\x1eï¿½wï¿½ï¿½{ayï¿½\x1dÊ‡Ú™ï¿½,j\aï¿½ï¿½fï¿½ï¿½ï¿½hï¿½ï¿½ï¿½zï¿½\x1eï¿½wï¿½ï¿½ï¿½\fï¿½ï¿½ï¿½j:+vï¿½ï¿½ï¿½wï¿½jï¿½mï¿½ï¿½ï¿½ï¿½\aï¿½ï¿½ï¿½ï¿½zZ+ï¿½ï¿½ï¿½ï¿½ï¿½Ý¢j"ï¿½ï¿½!ï¿½iOï¿½ï¿½zï¿½ï¿½vï¿½^\x14\x04\x1aï¿½^[mï¿½ï¿½ï¿½ï¿½\vnÆŠï¿½ï¿½Y&ï¿½
>

--
Thanks!
Yijing