summaryrefslogtreecommitdiff
path: root/drivers/cxl/core
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 /drivers/cxl/core
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 'drivers/cxl/core')
-rw-r--r--drivers/cxl/core/cdat.c18
-rw-r--r--drivers/cxl/core/edac.c2
-rw-r--r--drivers/cxl/core/features.c2
-rw-r--r--drivers/cxl/core/memdev.c2
-rw-r--r--drivers/cxl/core/pmem.c4
-rw-r--r--drivers/cxl/core/pmu.c2
-rw-r--r--drivers/cxl/core/port.c10
-rw-r--r--drivers/cxl/core/region.c8
8 files changed, 24 insertions, 24 deletions
diff --git a/drivers/cxl/core/cdat.c b/drivers/cxl/core/cdat.c
index a024083bae2d..5c9f07262513 100644
--- a/drivers/cxl/core/cdat.c
+++ b/drivers/cxl/core/cdat.c
@@ -69,7 +69,7 @@ static int cdat_dsmas_handler(union acpi_subtable_headers *header, void *arg,
/* Skip common header */
dsmas = (struct acpi_cdat_dsmas *)(hdr + 1);
- dent = kzalloc_obj(*dent, GFP_KERNEL);
+ dent = kzalloc_obj(*dent);
if (!dent)
return -ENOMEM;
@@ -669,7 +669,7 @@ static int cxl_endpoint_gather_bandwidth(struct cxl_region *cxlr,
perf_ctx = xa_load(usp_xa, index);
if (!perf_ctx) {
struct cxl_perf_ctx *c __free(kfree) =
- kzalloc_obj(*perf_ctx, GFP_KERNEL);
+ kzalloc_obj(*perf_ctx);
if (!c)
return -ENOMEM;
@@ -756,7 +756,7 @@ static struct xarray *cxl_switch_gather_bandwidth(struct cxl_region *cxlr,
bool *gp_is_root)
{
struct xarray *res_xa __free(free_perf_xa) =
- kzalloc_obj(*res_xa, GFP_KERNEL);
+ kzalloc_obj(*res_xa);
struct access_coordinate coords[ACCESS_COORDINATE_MAX];
struct cxl_perf_ctx *ctx, *us_ctx;
unsigned long index, us_index;
@@ -795,7 +795,7 @@ static struct xarray *cxl_switch_gather_bandwidth(struct cxl_region *cxlr,
us_ctx = xa_load(res_xa, us_index);
if (!us_ctx) {
struct cxl_perf_ctx *n __free(kfree) =
- kzalloc_obj(*n, GFP_KERNEL);
+ kzalloc_obj(*n);
if (!n)
return ERR_PTR(-ENOMEM);
@@ -862,7 +862,7 @@ static struct xarray *cxl_switch_gather_bandwidth(struct cxl_region *cxlr,
static struct xarray *cxl_rp_gather_bandwidth(struct xarray *xa)
{
struct xarray *hb_xa __free(free_perf_xa) =
- kzalloc_obj(*hb_xa, GFP_KERNEL);
+ kzalloc_obj(*hb_xa);
struct cxl_perf_ctx *ctx;
unsigned long index;
@@ -879,7 +879,7 @@ static struct xarray *cxl_rp_gather_bandwidth(struct xarray *xa)
hb_ctx = xa_load(hb_xa, hb_index);
if (!hb_ctx) {
struct cxl_perf_ctx *n __free(kfree) =
- kzalloc_obj(*n, GFP_KERNEL);
+ kzalloc_obj(*n);
if (!n)
return ERR_PTR(-ENOMEM);
@@ -906,7 +906,7 @@ static struct xarray *cxl_rp_gather_bandwidth(struct xarray *xa)
static struct xarray *cxl_hb_gather_bandwidth(struct xarray *xa)
{
struct xarray *mw_xa __free(free_perf_xa) =
- kzalloc_obj(*mw_xa, GFP_KERNEL);
+ kzalloc_obj(*mw_xa);
struct cxl_perf_ctx *ctx;
unsigned long index;
@@ -928,7 +928,7 @@ static struct xarray *cxl_hb_gather_bandwidth(struct xarray *xa)
mw_ctx = xa_load(mw_xa, mw_index);
if (!mw_ctx) {
struct cxl_perf_ctx *n __free(kfree) =
- kzalloc_obj(*n, GFP_KERNEL);
+ kzalloc_obj(*n);
if (!n)
return ERR_PTR(-ENOMEM);
@@ -987,7 +987,7 @@ void cxl_region_shared_upstream_bandwidth_update(struct cxl_region *cxlr)
lockdep_assert_held(&cxl_rwsem.dpa);
struct xarray *usp_xa __free(free_perf_xa) =
- kzalloc_obj(*usp_xa, GFP_KERNEL);
+ kzalloc_obj(*usp_xa);
if (!usp_xa)
return;
diff --git a/drivers/cxl/core/edac.c b/drivers/cxl/core/edac.c
index 7f5457adb26c..b321971fef58 100644
--- a/drivers/cxl/core/edac.c
+++ b/drivers/cxl/core/edac.c
@@ -2009,7 +2009,7 @@ static void err_rec_free(void *_cxlmd)
static int devm_cxl_memdev_setup_err_rec(struct cxl_memdev *cxlmd)
{
- struct cxl_mem_err_rec *array_rec = kzalloc_obj(*array_rec, GFP_KERNEL);
+ struct cxl_mem_err_rec *array_rec = kzalloc_obj(*array_rec);
if (!array_rec)
return -ENOMEM;
diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
index 2007d8ebe1c4..75c5534ce205 100644
--- a/drivers/cxl/core/features.c
+++ b/drivers/cxl/core/features.c
@@ -204,7 +204,7 @@ int devm_cxl_setup_features(struct cxl_dev_state *cxlds)
return -ENODEV;
struct cxl_features_state *cxlfs __free(kfree) =
- kzalloc_obj(*cxlfs, GFP_KERNEL);
+ kzalloc_obj(*cxlfs);
if (!cxlfs)
return -ENOMEM;
diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c
index a81df0de4889..d0159fb19b0f 100644
--- a/drivers/cxl/core/memdev.c
+++ b/drivers/cxl/core/memdev.c
@@ -665,7 +665,7 @@ static struct cxl_memdev *cxl_memdev_alloc(struct cxl_dev_state *cxlds,
struct cdev *cdev;
int rc;
- cxlmd = kzalloc_obj(*cxlmd, GFP_KERNEL);
+ cxlmd = kzalloc_obj(*cxlmd);
if (!cxlmd)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/cxl/core/pmem.c b/drivers/cxl/core/pmem.c
index be7538e58b9c..3c6e76721522 100644
--- a/drivers/cxl/core/pmem.c
+++ b/drivers/cxl/core/pmem.c
@@ -83,7 +83,7 @@ static struct cxl_nvdimm_bridge *cxl_nvdimm_bridge_alloc(struct cxl_port *port)
struct device *dev;
int rc;
- cxl_nvb = kzalloc_obj(*cxl_nvb, GFP_KERNEL);
+ cxl_nvb = kzalloc_obj(*cxl_nvb);
if (!cxl_nvb)
return ERR_PTR(-ENOMEM);
@@ -198,7 +198,7 @@ static struct cxl_nvdimm *cxl_nvdimm_alloc(struct cxl_nvdimm_bridge *cxl_nvb,
struct cxl_nvdimm *cxl_nvd;
struct device *dev;
- cxl_nvd = kzalloc_obj(*cxl_nvd, GFP_KERNEL);
+ cxl_nvd = kzalloc_obj(*cxl_nvd);
if (!cxl_nvd)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/cxl/core/pmu.c b/drivers/cxl/core/pmu.c
index 8eb175c3ff22..57e9a99f3639 100644
--- a/drivers/cxl/core/pmu.c
+++ b/drivers/cxl/core/pmu.c
@@ -33,7 +33,7 @@ int devm_cxl_pmu_add(struct device *parent, struct cxl_pmu_regs *regs,
struct device *dev;
int rc;
- pmu = kzalloc_obj(*pmu, GFP_KERNEL);
+ pmu = kzalloc_obj(*pmu);
if (!pmu)
return -ENOMEM;
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 491c7485db60..d6433c544e3c 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -688,11 +688,11 @@ static struct cxl_port *cxl_port_alloc(struct device *uport_dev,
/* No parent_dport, root cxl_port */
if (!parent_dport) {
- cxl_root = kzalloc_obj(*cxl_root, GFP_KERNEL);
+ cxl_root = kzalloc_obj(*cxl_root);
if (!cxl_root)
return ERR_PTR(-ENOMEM);
} else {
- _port = kzalloc_obj(*port, GFP_KERNEL);
+ _port = kzalloc_obj(*port);
if (!_port)
return ERR_PTR(-ENOMEM);
}
@@ -1184,7 +1184,7 @@ __devm_cxl_add_dport(struct cxl_port *port, struct device *dport_dev,
CXL_TARGET_STRLEN)
return ERR_PTR(-EINVAL);
- dport = kzalloc_obj(*dport, GFP_KERNEL);
+ dport = kzalloc_obj(*dport);
if (!dport)
return ERR_PTR(-ENOMEM);
@@ -1350,7 +1350,7 @@ static int cxl_add_ep(struct cxl_dport *dport, struct device *ep_dev)
struct cxl_ep *ep;
int rc;
- ep = kzalloc_obj(*ep, GFP_KERNEL);
+ ep = kzalloc_obj(*ep);
if (!ep)
return -ENOMEM;
@@ -2101,7 +2101,7 @@ struct cxl_endpoint_decoder *cxl_endpoint_decoder_alloc(struct cxl_port *port)
if (!is_cxl_endpoint(port))
return ERR_PTR(-EINVAL);
- cxled = kzalloc_obj(*cxled, GFP_KERNEL);
+ cxled = kzalloc_obj(*cxled);
if (!cxled)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 288448cff91b..e7fedfe8f1b6 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -998,7 +998,7 @@ alloc_region_ref(struct cxl_port *port, struct cxl_region *cxlr,
return ERR_PTR(-EBUSY);
}
- cxl_rr = kzalloc_obj(*cxl_rr, GFP_KERNEL);
+ cxl_rr = kzalloc_obj(*cxl_rr);
if (!cxl_rr)
return ERR_PTR(-ENOMEM);
cxl_rr->port = port;
@@ -2474,7 +2474,7 @@ static struct cxl_region *cxl_region_alloc(struct cxl_root_decoder *cxlrd, int i
struct cxl_region *cxlr;
struct device *dev;
- cxlr = kzalloc_obj(*cxlr, GFP_KERNEL);
+ cxlr = kzalloc_obj(*cxlr);
if (!cxlr) {
memregion_free(id);
return ERR_PTR(-ENOMEM);
@@ -3552,7 +3552,7 @@ static struct cxl_dax_region *cxl_dax_region_alloc(struct cxl_region *cxlr)
if (p->state != CXL_CONFIG_COMMIT)
return ERR_PTR(-ENXIO);
- cxlr_dax = kzalloc_obj(*cxlr_dax, GFP_KERNEL);
+ cxlr_dax = kzalloc_obj(*cxlr_dax);
if (!cxlr_dax)
return ERR_PTR(-ENOMEM);
@@ -3835,7 +3835,7 @@ static int __construct_region(struct cxl_region *cxlr,
set_bit(CXL_REGION_F_AUTO, &cxlr->flags);
cxlr->hpa_range = *hpa_range;
- res = kmalloc_obj(*res, GFP_KERNEL);
+ res = kmalloc_obj(*res);
if (!res)
return -ENOMEM;