Re: [PATCH v2 5/5] fs/resctrl: Drop unnecessary parameter from resctrl_io_alloc_parse_line()

From: Chen Yu

Date: Sun Oct 18 2026 - 13:43:56 EST


On Wed, Oct 07, 2026 at 02:06:47PM -0700, Reinette Chatre wrote:
>
> resctrl_io_alloc_parse_line() parses a line written to the io_alloc_cbm file.
> It receives both a schema and a pointer to the schema's resource. Its only
> caller looks up the resource from the schema just to pass both.
>
> Passing the resource separately is redundant and allows a caller to pass a
> resource that does not belong to the schema. parse_line(), which parses lines
> written to the schemata file, already receives only the schema and determines
> the resource from it.
>
> Pass only the schema to resctrl_io_alloc_parse_line() and have it determine
> the resource itself, matching parse_line() and in preparation for passing
> additional information when supporting multiple controls.
>
> No functional change.
>
> Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> Reviewed-by: Ben Horgan <ben.horgan@xxxxxxx>
>

Reviewed-by: Chen Yu <yu.c.chen@xxxxxxxxx>

thanks,
Chenyu