mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
PCI: Remove pci_bus_b() and use list_for_each_entry() directly
Replace list_for_each() with list_for_each_entry(), which means we no longer need pci_bus_b() and can remove it. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
560698e9d2
commit
94e6a9b930
3 changed files with 8 additions and 9 deletions
|
@ -108,12 +108,12 @@ static bool pcie_ari_disabled;
|
|||
*/
|
||||
unsigned char pci_bus_max_busnr(struct pci_bus* bus)
|
||||
{
|
||||
struct list_head *tmp;
|
||||
struct pci_bus *tmp;
|
||||
unsigned char max, n;
|
||||
|
||||
max = bus->busn_res.end;
|
||||
list_for_each(tmp, &bus->children) {
|
||||
n = pci_bus_max_busnr(pci_bus_b(tmp));
|
||||
list_for_each_entry(tmp, &bus->children, node) {
|
||||
n = pci_bus_max_busnr(tmp);
|
||||
if(n > max)
|
||||
max = n;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue