Re: [PATCH v2 11/24] selftests/resctrl: Remove start_buf local variable from buffer alloc func

From: Reinette Chatre
Date: Fri Apr 21 2023 - 20:16:43 EST


Hi Ilpo,

On 4/18/2023 4:44 AM, Ilpo Järvinen wrote:
> alloc_buffer() has local start_ptr variable which is unnecessary.
>
> Assign the pointer of the allocated buffer directly to startptr that is
> a global variable in fill_buf to simplify the code in alloc_buffer().

I think the opposite (removing the global variable) would make the
code more manageable. Tests manage their own buffer pointers, there is
no need for a global buffer pointer (that I can see).

Reinette