Skip to contentSkip to conversation

Extended Capabilities Linked-List Parsing

DISCUSSION Sean O. Stalley 1 participant 1 message Mar 31, 2015 PCI

lore
Share & tools
lore
#0 lore raw

Hello All,

I was looking through pci_init_capabilities().

I noticed that most of the init functions in it call pci_find_capability(), and return early if they can't find the capability in the list.

It seemed odd to me that each init function made a separate call into pci_find_capability().

Wouldn't it be better to walk the list once (in pci_init_capabilities()), find all of the capability entries, and only call the init functions for entries that exist?

Thanks,
Sean O. Stalley