[Skiboot] [PATCH 2/6] pci: Add pci_next_phb()

Reza Arbab arbab at linux.ibm.com
Tue Jul 31 02:00:08 AEST 2018


On Mon, Jul 30, 2018 at 04:31:43PM +1000, Oliver wrote:
>On Sat, Jul 28, 2018 at 12:47 AM, Reza Arbab <arbab at linux.ibm.com> wrote:
>> diff --git a/core/pci.c b/core/pci.c
>> index 6ba6eda..4faf88e 100644
>> --- a/core/pci.c
>> +++ b/core/pci.c
>> @@ -1104,6 +1104,18 @@ struct phb *pci_get_phb(uint64_t phb_id)
>>         return phbs[phb_id];
>>  }
>>
>> +/* Iterator to walk over every PHB */
>> +struct phb *pci_next_phb(struct phb *last)
>> +{
>> +       uint64_t phb_id = last ? last->opal_id + 1 : 0;
>> +
>> +       for (; phb_id < ARRAY_SIZE(phbs); phb_id++)
>> +               if (phbs[phb_id])
>> +                       return phbs[phb_id];
>> +
>> +       return NULL;
>> +}
>
>So __pci_next_phb_idx() is kind of weird so I don't mind replacing it
>with this, but you should probably do the replacement too ;)

Now that I look, the rest of the set doesn't even actually use 
pci_next_phb(), so I'm going to drop this patch entirely.

Man... who wrote this crap?

-- 
Reza Arbab



More information about the Skiboot mailing list