[PATCH 5/5] fs/resctrl: Drop unnecessary parameter from resctrl_io_alloc_parse_line()
From: Reinette Chatre
Date: Thu Sep 03 2026 - 13:48:11 EST
resctrl_io_alloc_parse_line() only has one caller that determines the
resource via resctrl_schema::res and then passes a pointer to the resource
as well as struct resctrl_schema.
Only pass pointer to struct resctrl_schema. resctrl_io_alloc_parse_line()
can determine the resource itself.
Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
---
Changes since RFC v2:
- Rework changelog.
---
fs/resctrl/ctrlmondata.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c
index 4562072b8ba6..69123b2a3274 100644
--- a/fs/resctrl/ctrlmondata.c
+++ b/fs/resctrl/ctrlmondata.c
@@ -955,11 +955,12 @@ int resctrl_io_alloc_cbm_show(struct kernfs_open_file *of, struct seq_file *seq,
return ret;
}
-static int resctrl_io_alloc_parse_line(char *line, struct rdt_resource *r,
- struct resctrl_schema *s, u32 closid)
+static int resctrl_io_alloc_parse_line(char *line, struct resctrl_schema *s,
+ u32 closid)
{
enum resctrl_conf_type peer_type;
unsigned long dom_id = ULONG_MAX;
+ struct rdt_resource *r = s->res;
struct rdt_parse_data data;
struct rdt_ctrl_domain *d;
bool update_all = false;
@@ -1052,7 +1053,7 @@ ssize_t resctrl_io_alloc_cbm_write(struct kernfs_open_file *of, char *buf,
io_alloc_closid = resctrl_io_alloc_closid(r);
rdt_staged_configs_clear();
- ret = resctrl_io_alloc_parse_line(buf, r, s, io_alloc_closid);
+ ret = resctrl_io_alloc_parse_line(buf, s, io_alloc_closid);
if (ret)
goto out_clear_configs;
--
2.55.0