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 /drivers/block/zram | |
| 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 'drivers/block/zram')
| -rw-r--r-- | drivers/block/zram/backend_deflate.c | 2 | ||||
| -rw-r--r-- | drivers/block/zram/backend_lz4.c | 6 | ||||
| -rw-r--r-- | drivers/block/zram/backend_lz4hc.c | 6 | ||||
| -rw-r--r-- | drivers/block/zram/backend_zstd.c | 4 | ||||
| -rw-r--r-- | drivers/block/zram/zcomp.c | 2 | ||||
| -rw-r--r-- | drivers/block/zram/zram_drv.c | 6 |
6 files changed, 13 insertions, 13 deletions
diff --git a/drivers/block/zram/backend_deflate.c b/drivers/block/zram/backend_deflate.c index 7dee3aacb2d8..f92a52a720d1 100644 --- a/drivers/block/zram/backend_deflate.c +++ b/drivers/block/zram/backend_deflate.c @@ -54,7 +54,7 @@ static int deflate_create(struct zcomp_params *params, struct zcomp_ctx *ctx) size_t sz; int ret; - zctx = kzalloc_obj(*zctx, GFP_KERNEL); + zctx = kzalloc_obj(*zctx); if (!zctx) return -ENOMEM; diff --git a/drivers/block/zram/backend_lz4.c b/drivers/block/zram/backend_lz4.c index 3416fec9e982..04e186614760 100644 --- a/drivers/block/zram/backend_lz4.c +++ b/drivers/block/zram/backend_lz4.c @@ -41,7 +41,7 @@ static int lz4_create(struct zcomp_params *params, struct zcomp_ctx *ctx) { struct lz4_ctx *zctx; - zctx = kzalloc_obj(*zctx, GFP_KERNEL); + zctx = kzalloc_obj(*zctx); if (!zctx) return -ENOMEM; @@ -51,11 +51,11 @@ static int lz4_create(struct zcomp_params *params, struct zcomp_ctx *ctx) if (!zctx->mem) goto error; } else { - zctx->dstrm = kzalloc_obj(*zctx->dstrm, GFP_KERNEL); + zctx->dstrm = kzalloc_obj(*zctx->dstrm); if (!zctx->dstrm) goto error; - zctx->cstrm = kzalloc_obj(*zctx->cstrm, GFP_KERNEL); + zctx->cstrm = kzalloc_obj(*zctx->cstrm); if (!zctx->cstrm) goto error; } diff --git a/drivers/block/zram/backend_lz4hc.c b/drivers/block/zram/backend_lz4hc.c index fd94df9193d3..f6a336acfe20 100644 --- a/drivers/block/zram/backend_lz4hc.c +++ b/drivers/block/zram/backend_lz4hc.c @@ -41,7 +41,7 @@ static int lz4hc_create(struct zcomp_params *params, struct zcomp_ctx *ctx) { struct lz4hc_ctx *zctx; - zctx = kzalloc_obj(*zctx, GFP_KERNEL); + zctx = kzalloc_obj(*zctx); if (!zctx) return -ENOMEM; @@ -51,11 +51,11 @@ static int lz4hc_create(struct zcomp_params *params, struct zcomp_ctx *ctx) if (!zctx->mem) goto error; } else { - zctx->dstrm = kzalloc_obj(*zctx->dstrm, GFP_KERNEL); + zctx->dstrm = kzalloc_obj(*zctx->dstrm); if (!zctx->dstrm) goto error; - zctx->cstrm = kzalloc_obj(*zctx->cstrm, GFP_KERNEL); + zctx->cstrm = kzalloc_obj(*zctx->cstrm); if (!zctx->cstrm) goto error; } diff --git a/drivers/block/zram/backend_zstd.c b/drivers/block/zram/backend_zstd.c index d9303269b90d..d00b548056dc 100644 --- a/drivers/block/zram/backend_zstd.c +++ b/drivers/block/zram/backend_zstd.c @@ -53,7 +53,7 @@ static int zstd_setup_params(struct zcomp_params *params) zstd_compression_parameters prm; struct zstd_params *zp; - zp = kzalloc_obj(*zp, GFP_KERNEL); + zp = kzalloc_obj(*zp); if (!zp) return -ENOMEM; @@ -122,7 +122,7 @@ static int zstd_create(struct zcomp_params *params, struct zcomp_ctx *ctx) zstd_parameters prm; size_t sz; - zctx = kzalloc_obj(*zctx, GFP_KERNEL); + zctx = kzalloc_obj(*zctx); if (!zctx) return -ENOMEM; diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c index b53fb5fbc041..a771a8ecc540 100644 --- a/drivers/block/zram/zcomp.c +++ b/drivers/block/zram/zcomp.c @@ -238,7 +238,7 @@ struct zcomp *zcomp_create(const char *alg, struct zcomp_params *params) */ BUILD_BUG_ON(ARRAY_SIZE(backends) <= 1); - comp = kzalloc_obj(struct zcomp, GFP_KERNEL); + comp = kzalloc_obj(struct zcomp); if (!comp) return ERR_PTR(-ENOMEM); diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 3cc82b88b07e..bca33403fc8b 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -250,7 +250,7 @@ static struct zram_pp_ctl *init_pp_ctl(void) struct zram_pp_ctl *ctl; u32 idx; - ctl = kmalloc_obj(*ctl, GFP_KERNEL); + ctl = kmalloc_obj(*ctl); if (!ctl) return NULL; @@ -855,7 +855,7 @@ static struct zram_wb_ctl *init_wb_ctl(struct zram *zram) struct zram_wb_ctl *wb_ctl; int i; - wb_ctl = kmalloc_obj(*wb_ctl, GFP_KERNEL); + wb_ctl = kmalloc_obj(*wb_ctl); if (!wb_ctl) return NULL; @@ -3079,7 +3079,7 @@ static int zram_add(void) struct zram *zram; int ret, device_id; - zram = kzalloc_obj(struct zram, GFP_KERNEL); + zram = kzalloc_obj(struct zram); if (!zram) return -ENOMEM; |
