summaryrefslogtreecommitdiff
path: root/arch/powerpc/perf
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /arch/powerpc/perf
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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 'arch/powerpc/perf')
-rw-r--r--arch/powerpc/perf/hv-24x7.c8
-rw-r--r--arch/powerpc/perf/hv-gpci.c2
-rw-r--r--arch/powerpc/perf/imc-pmu.c8
-rw-r--r--arch/powerpc/perf/vpa-dtl.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 210d16c76b40..8a8d8c2b8930 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -451,7 +451,7 @@ static ssize_t coresperchip_show(struct device *dev,
static struct attribute *device_str_attr_create_(char *name, char *str)
{
- struct dev_ext_attribute *attr = kzalloc_obj(*attr, GFP_KERNEL);
+ struct dev_ext_attribute *attr = kzalloc_obj(*attr);
if (!attr)
return NULL;
@@ -647,7 +647,7 @@ static int event_uniq_add(struct rb_root *root, const char *name, int nl,
}
}
- data = kmalloc_obj(*data, GFP_KERNEL);
+ data = kmalloc_obj(*data);
if (!data)
return -ENOMEM;
@@ -905,13 +905,13 @@ static int create_events_from_catalog(struct attribute ***events_,
pr_warn("event buffer ended before listed # of events were parsed (got %zu, wanted %zu, junk %zu)\n",
event_idx_last, event_entry_count, junk_events);
- events = kmalloc_objs(*events, attr_max + 1, GFP_KERNEL);
+ events = kmalloc_objs(*events, attr_max + 1);
if (!events) {
ret = -ENOMEM;
goto e_event_data;
}
- event_descs = kmalloc_objs(*event_descs, event_idx + 1, GFP_KERNEL);
+ event_descs = kmalloc_objs(*event_descs, event_idx + 1);
if (!event_descs) {
ret = -ENOMEM;
goto e_event_attrs;
diff --git a/arch/powerpc/perf/hv-gpci.c b/arch/powerpc/perf/hv-gpci.c
index 11e774857030..5cac2cf3bd1e 100644
--- a/arch/powerpc/perf/hv-gpci.c
+++ b/arch/powerpc/perf/hv-gpci.c
@@ -910,7 +910,7 @@ static struct device_attribute *sysinfo_device_attr_create(int
* attribute array, only for valid return types.
*/
if (!ret || ret == H_AUTHORITY || ret == H_PARAMETER) {
- attr = kzalloc_obj(*attr, GFP_KERNEL);
+ attr = kzalloc_obj(*attr);
if (!attr)
return NULL;
diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c
index c4b2c0a19f58..e3cb23906fcd 100644
--- a/arch/powerpc/perf/imc-pmu.c
+++ b/arch/powerpc/perf/imc-pmu.c
@@ -136,7 +136,7 @@ static struct attribute *device_str_attr_create(const char *name, const char *st
{
struct perf_pmu_events_attr *attr;
- attr = kzalloc_obj(*attr, GFP_KERNEL);
+ attr = kzalloc_obj(*attr);
if (!attr)
return NULL;
sysfs_attr_init(&attr->attr.attr);
@@ -257,7 +257,7 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu)
of_property_read_u32(node, "reg", &base_reg);
/* Allocate memory for the events */
- pmu->events = kzalloc_objs(struct imc_events, ct, GFP_KERNEL);
+ pmu->events = kzalloc_objs(struct imc_events, ct);
if (!pmu->events) {
of_node_put(pmu_events);
return -ENOMEM;
@@ -274,7 +274,7 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu)
of_node_put(pmu_events);
/* Allocate memory for attribute group */
- attr_group = kzalloc_obj(*attr_group, GFP_KERNEL);
+ attr_group = kzalloc_obj(*attr_group);
if (!attr_group) {
imc_free_events(pmu->events, ct);
return -ENOMEM;
@@ -288,7 +288,7 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu)
* So allocate three times the "ct" (this includes event, event_scale and
* event_unit).
*/
- attrs = kzalloc_objs(struct attribute *, ((ct * 3) + 1), GFP_KERNEL);
+ attrs = kzalloc_objs(struct attribute *, ((ct * 3) + 1));
if (!attrs) {
kfree(attr_group);
imc_free_events(pmu->events, ct);
diff --git a/arch/powerpc/perf/vpa-dtl.c b/arch/powerpc/perf/vpa-dtl.c
index ab19101a8928..3e3d65b6c796 100644
--- a/arch/powerpc/perf/vpa-dtl.c
+++ b/arch/powerpc/perf/vpa-dtl.c
@@ -523,7 +523,7 @@ static void *vpa_dtl_setup_aux(struct perf_event *event, void **pages,
if (!buf)
return NULL;
- pglist = kzalloc_objs(*pglist, nr_pages, GFP_KERNEL);
+ pglist = kzalloc_objs(*pglist, nr_pages);
if (!pglist)
return NULL;