From bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 21 Feb 2026 16:37:42 -0800 Subject: Convert 'alloc_obj' family to use the new default GFP_KERNEL argument This was done entirely with mindless brute force, using git grep -l '\ --- lib/crypto/gf128mul.c | 6 +++--- lib/crypto/mpi/mpih-mul.c | 2 +- lib/crypto/mpi/mpiutil.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/gf128mul.c b/lib/crypto/gf128mul.c index 42c5fdc2d4ca..e5a727b15f07 100644 --- a/lib/crypto/gf128mul.c +++ b/lib/crypto/gf128mul.c @@ -245,12 +245,12 @@ struct gf128mul_64k *gf128mul_init_64k_bbe(const be128 *g) struct gf128mul_64k *t; int i, j, k; - t = kzalloc_obj(*t, GFP_KERNEL); + t = kzalloc_obj(*t); if (!t) goto out; for (i = 0; i < 16; i++) { - t->t[i] = kzalloc_obj(*t->t[i], GFP_KERNEL); + t->t[i] = kzalloc_obj(*t->t[i]); if (!t->t[i]) { gf128mul_free_64k(t); t = NULL; @@ -326,7 +326,7 @@ struct gf128mul_4k *gf128mul_init_4k_lle(const be128 *g) struct gf128mul_4k *t; int j, k; - t = kzalloc_obj(*t, GFP_KERNEL); + t = kzalloc_obj(*t); if (!t) goto out; diff --git a/lib/crypto/mpi/mpih-mul.c b/lib/crypto/mpi/mpih-mul.c index 9cd0843e9d36..29dd80609c47 100644 --- a/lib/crypto/mpi/mpih-mul.c +++ b/lib/crypto/mpi/mpih-mul.c @@ -372,7 +372,7 @@ mpihelp_mul_karatsuba_case(mpi_ptr_t prodp, return -ENOMEM; } else { if (!ctx->next) { - ctx->next = kzalloc_obj(*ctx, GFP_KERNEL); + ctx->next = kzalloc_obj(*ctx); if (!ctx->next) return -ENOMEM; } diff --git a/lib/crypto/mpi/mpiutil.c b/lib/crypto/mpi/mpiutil.c index 4999f756f50e..f4faf7c903f9 100644 --- a/lib/crypto/mpi/mpiutil.c +++ b/lib/crypto/mpi/mpiutil.c @@ -33,7 +33,7 @@ MPI mpi_alloc(unsigned nlimbs) { MPI a; - a = kmalloc_obj(*a, GFP_KERNEL); + a = kmalloc_obj(*a); if (!a) return a; @@ -93,14 +93,14 @@ int mpi_resize(MPI a, unsigned nlimbs) return 0; /* no need to do it */ if (a->d) { - p = kzalloc_objs(mpi_limb_t, nlimbs, GFP_KERNEL); + p = kzalloc_objs(mpi_limb_t, nlimbs); if (!p) return -ENOMEM; memcpy(p, a->d, a->alloced * sizeof(mpi_limb_t)); kfree_sensitive(a->d); a->d = p; } else { - a->d = kzalloc_objs(mpi_limb_t, nlimbs, GFP_KERNEL); + a->d = kzalloc_objs(mpi_limb_t, nlimbs); if (!a->d) return -ENOMEM; } -- cgit v1.2.3