diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /fs/resctrl | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/resctrl')
| -rw-r--r-- | fs/resctrl/monitor.c | 2 | ||||
| -rw-r--r-- | fs/resctrl/pseudo_lock.c | 4 | ||||
| -rw-r--r-- | fs/resctrl/rdtgroup.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index 6fd5c0e8a0dd..49f3f6b846b2 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -923,7 +923,7 @@ int setup_rmid_lru_list(void) return 0; idx_limit = resctrl_arch_system_num_rmid_idx(); - rmid_ptrs = kzalloc_objs(struct rmid_entry, idx_limit, GFP_KERNEL); + rmid_ptrs = kzalloc_objs(struct rmid_entry, idx_limit); if (!rmid_ptrs) return -ENOMEM; diff --git a/fs/resctrl/pseudo_lock.c b/fs/resctrl/pseudo_lock.c index 55e71d257324..fa3687d69ebd 100644 --- a/fs/resctrl/pseudo_lock.c +++ b/fs/resctrl/pseudo_lock.c @@ -154,7 +154,7 @@ static int pseudo_lock_cstates_constrain(struct pseudo_lock_region *plr) int ret; for_each_cpu(cpu, &plr->d->hdr.cpu_mask) { - pm_req = kzalloc_obj(*pm_req, GFP_KERNEL); + pm_req = kzalloc_obj(*pm_req); if (!pm_req) { rdt_last_cmd_puts("Failure to allocate memory for PM QoS\n"); ret = -ENOMEM; @@ -270,7 +270,7 @@ static int pseudo_lock_init(struct rdtgroup *rdtgrp) { struct pseudo_lock_region *plr; - plr = kzalloc_obj(*plr, GFP_KERNEL); + plr = kzalloc_obj(*plr); if (!plr) return -ENOMEM; diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 1135208adafb..5da305bd36c9 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -2686,7 +2686,7 @@ static int schemata_list_add(struct rdt_resource *r, enum resctrl_conf_type type const char *suffix = ""; int ret, cl; - s = kzalloc_obj(*s, GFP_KERNEL); + s = kzalloc_obj(*s); if (!s) return -ENOMEM; @@ -2966,7 +2966,7 @@ static int rdt_init_fs_context(struct fs_context *fc) { struct rdt_fs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; @@ -3117,7 +3117,7 @@ static struct mon_data *mon_get_kn_priv(enum resctrl_res_level rid, int domid, return priv; } - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return NULL; @@ -3753,7 +3753,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, } /* allocate the rdtgroup. */ - rdtgrp = kzalloc_obj(*rdtgrp, GFP_KERNEL); + rdtgrp = kzalloc_obj(*rdtgrp); if (!rdtgrp) { ret = -ENOSPC; rdt_last_cmd_puts("Kernel out of memory\n"); |
