Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-26 Thread Michael Ellerman
On Sat, 2020-03-07 at 02:45:47 UTC, Tyrel Datwyler wrote: > The expectation is that when calling of_read_drc_info_cell() > repeatedly to parse multiple drc-info records that the in/out curval > parameter points at the start of the next record on return. However, > the current behavior has curval st

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Michael Ellerman
Nathan Lynch writes: > Michael Ellerman writes: >> >> It would also be *really* nice if we had some unit tests for this >> parsing code, it's demonstrably very bug prone. > > Can you say more about what form unit tests could take? Like some self > tests that run at boot time, or is there a way to

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Michael Ellerman
Tyrel Datwyler writes: > On 3/11/20 10:43 PM, Michael Ellerman wrote: >> Tyrel Datwyler writes: >>> On 3/10/20 10:25 AM, Nathan Lynch wrote: Tyrel Datwyler writes: > The expectation is that when calling of_read_drc_info_cell() > repeatedly to parse multiple drc-info records that the

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Tyrel Datwyler
On 3/11/20 10:43 PM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 3/10/20 10:25 AM, Nathan Lynch wrote: >>> Tyrel Datwyler writes: The expectation is that when calling of_read_drc_info_cell() repeatedly to parse multiple drc-info records that the in/out curval parameter p

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Nathan Lynch
Michael Ellerman writes: > > It would also be *really* nice if we had some unit tests for this > parsing code, it's demonstrably very bug prone. Can you say more about what form unit tests could take? Like some self tests that run at boot time, or is there a way to run the code in a user space te

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-11 Thread Michael Ellerman
Tyrel Datwyler writes: > On 3/10/20 10:25 AM, Nathan Lynch wrote: >> Tyrel Datwyler writes: >>> The expectation is that when calling of_read_drc_info_cell() >>> repeatedly to parse multiple drc-info records that the in/out curval >>> parameter points at the start of the next record on return. How

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-10 Thread Tyrel Datwyler
On 3/10/20 10:25 AM, Nathan Lynch wrote: > Tyrel Datwyler writes: >> The expectation is that when calling of_read_drc_info_cell() >> repeatedly to parse multiple drc-info records that the in/out curval >> parameter points at the start of the next record on return. However, >> the current behavior

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-10 Thread Nathan Lynch
Tyrel Datwyler writes: > The expectation is that when calling of_read_drc_info_cell() > repeatedly to parse multiple drc-info records that the in/out curval > parameter points at the start of the next record on return. However, > the current behavior has curval still pointing at the final value of

[PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-06 Thread Tyrel Datwyler
The expectation is that when calling of_read_drc_info_cell() repeatedly to parse multiple drc-info records that the in/out curval parameter points at the start of the next record on return. However, the current behavior has curval still pointing at the final value of the record just parsed. The res