Re: [PATCH v2 1/2] ppc/pnv: use a do-while() loop in pnv_phb3_translate_tve()

2022-01-27 Thread Daniel Henrique Barboza
On 1/27/22 09:28, Matheus K. Ferst wrote: On 27/01/2022 09:09, Daniel Henrique Barboza wrote: On 1/27/22 08:41, Matheus K. Ferst wrote: On 26/01/2022 17:14, Daniel Henrique Barboza wrote: The 'taddr' variable is left unintialized, being set only inside the "while ((lev--) >= 0)" loop where

Re: [PATCH v2 1/2] ppc/pnv: use a do-while() loop in pnv_phb3_translate_tve()

2022-01-27 Thread Daniel Henrique Barboza
On 1/27/22 08:41, Matheus K. Ferst wrote: On 26/01/2022 17:14, Daniel Henrique Barboza wrote: The 'taddr' variable is left unintialized, being set only inside the "while ((lev--) >= 0)" loop where we get the TCE address. The 'lev' var is an int32_t that is being initiliazed by the GETFIELD()

Re: [PATCH v2 1/2] ppc/pnv: use a do-while() loop in pnv_phb3_translate_tve()

2022-01-27 Thread BALATON Zoltan
On Thu, 27 Jan 2022, Daniel Henrique Barboza wrote: On 1/27/22 08:41, Matheus K. Ferst wrote: On 26/01/2022 17:14, Daniel Henrique Barboza wrote: The 'taddr' variable is left unintialized, being set only inside the "while ((lev--) >= 0)" loop where we get the TCE address. The 'lev' var is an

Re: [PATCH v2 1/2] ppc/pnv: use a do-while() loop in pnv_phb3_translate_tve()

2022-01-27 Thread Matheus K. Ferst
On 27/01/2022 09:09, Daniel Henrique Barboza wrote: On 1/27/22 08:41, Matheus K. Ferst wrote: On 26/01/2022 17:14, Daniel Henrique Barboza wrote: The 'taddr' variable is left unintialized, being set only inside the "while ((lev--) >= 0)" loop where we get the TCE address. The 'lev' var is an

Re: [PATCH v2 1/2] ppc/pnv: use a do-while() loop in pnv_phb3_translate_tve()

2022-01-27 Thread Matheus K. Ferst
On 26/01/2022 17:14, Daniel Henrique Barboza wrote: The 'taddr' variable is left unintialized, being set only inside the "while ((lev--) >= 0)" loop where we get the TCE address. The 'lev' var is an int32_t that is being initiliazed by the GETFIELD() macro, which returns an uint64_t. For a

[PATCH v2 1/2] ppc/pnv: use a do-while() loop in pnv_phb3_translate_tve()

2022-01-26 Thread Daniel Henrique Barboza
The 'taddr' variable is left unintialized, being set only inside the "while ((lev--) >= 0)" loop where we get the TCE address. The 'lev' var is an int32_t that is being initiliazed by the GETFIELD() macro, which returns an uint64_t. For a human reader this means that 'lev' will always be positive