Re: [PATCH] powerpc/pci: Fix PHB numbering when using opal-phbid

2022-08-05 Thread Michael Ellerman
On Tue, 2 Aug 2022 20:57:23 +1000, Michael Ellerman wrote: > The recent change to the PHB numbering logic has a logic error in the > handling of "ibm,opal-phbid". > > When an "ibm,opal-phbid" property is present, &prop is written to and > ret is set to zero. > > The following call to of_alias_get

Re: [PATCH] powerpc/pci: Fix PHB numbering when using opal-phbid

2022-08-02 Thread Pali Rohár
On Tuesday 02 August 2022 20:57:23 Michael Ellerman wrote: > The recent change to the PHB numbering logic has a logic error in the > handling of "ibm,opal-phbid". > > When an "ibm,opal-phbid" property is present, &prop is written to and > ret is set to zero. > > The following call to of_alias_get

[PATCH] powerpc/pci: Fix PHB numbering when using opal-phbid

2022-08-02 Thread Michael Ellerman
The recent change to the PHB numbering logic has a logic error in the handling of "ibm,opal-phbid". When an "ibm,opal-phbid" property is present, &prop is written to and ret is set to zero. The following call to of_alias_get_id() is skipped because ret == 0. But then the if (ret >= 0) is true, a