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 /net/atm | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip | |
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 'net/atm')
| -rw-r--r-- | net/atm/br2684.c | 2 | ||||
| -rw-r--r-- | net/atm/clip.c | 2 | ||||
| -rw-r--r-- | net/atm/lec.c | 4 | ||||
| -rw-r--r-- | net/atm/mpc.c | 4 | ||||
| -rw-r--r-- | net/atm/mpoa_caches.c | 4 | ||||
| -rw-r--r-- | net/atm/pppoatm.c | 2 | ||||
| -rw-r--r-- | net/atm/resources.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 8fdc25271708..6580d67c3456 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c @@ -538,7 +538,7 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg) if (copy_from_user(&be, arg, sizeof be)) return -EFAULT; - brvcc = kzalloc_obj(struct br2684_vcc, GFP_KERNEL); + brvcc = kzalloc_obj(struct br2684_vcc); if (!brvcc) return -ENOMEM; /* diff --git a/net/atm/clip.c b/net/atm/clip.c index 40553fcab389..516b2214680b 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -431,7 +431,7 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout) return -EBADFD; if (vcc->user_back) return -EINVAL; - clip_vcc = kmalloc_obj(struct clip_vcc, GFP_KERNEL); + clip_vcc = kmalloc_obj(struct clip_vcc); if (!clip_vcc) return -ENOMEM; pr_debug("%p vcc %p\n", clip_vcc, vcc); diff --git a/net/atm/lec.c b/net/atm/lec.c index cba26158c4ad..a107375c0629 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -696,7 +696,7 @@ static int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg) ioc_data.dev_num = array_index_nospec(ioc_data.dev_num, MAX_LEC_ITF); if (!dev_lec[ioc_data.dev_num]) return -EINVAL; - vpriv = kmalloc_obj(struct lec_vcc_priv, GFP_KERNEL); + vpriv = kmalloc_obj(struct lec_vcc_priv); if (!vpriv) return -ENOMEM; vpriv->xoff = 0; @@ -2125,7 +2125,7 @@ static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc) struct lec_vcc_priv *vpriv; int err = 0; - vpriv = kmalloc_obj(struct lec_vcc_priv, GFP_KERNEL); + vpriv = kmalloc_obj(struct lec_vcc_priv); if (!vpriv) return -ENOMEM; vpriv->xoff = 0; diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 3e2b13734fc4..ce8e9780373b 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c @@ -184,7 +184,7 @@ struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos) return entry; } - entry = kmalloc_obj(struct atm_mpoa_qos, GFP_KERNEL); + entry = kmalloc_obj(struct atm_mpoa_qos); if (entry == NULL) { pr_info("mpoa: out of memory\n"); return entry; @@ -282,7 +282,7 @@ static struct mpoa_client *alloc_mpc(void) { struct mpoa_client *mpc; - mpc = kzalloc_obj(struct mpoa_client, GFP_KERNEL); + mpc = kzalloc_obj(struct mpoa_client); if (mpc == NULL) return NULL; rwlock_init(&mpc->ingress_lock); diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c index b584ab72ed2f..c8d4e6f2e831 100644 --- a/net/atm/mpoa_caches.c +++ b/net/atm/mpoa_caches.c @@ -97,7 +97,7 @@ static in_cache_entry *in_cache_get_by_vcc(struct atm_vcc *vcc, static in_cache_entry *in_cache_add_entry(__be32 dst_ip, struct mpoa_client *client) { - in_cache_entry *entry = kzalloc_obj(in_cache_entry, GFP_KERNEL); + in_cache_entry *entry = kzalloc_obj(in_cache_entry); if (entry == NULL) { pr_info("mpoa: mpoa_caches.c: new_in_cache_entry: out of memory\n"); @@ -456,7 +456,7 @@ static void eg_cache_remove_entry(eg_cache_entry *entry, static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_client *client) { - eg_cache_entry *entry = kzalloc_obj(eg_cache_entry, GFP_KERNEL); + eg_cache_entry *entry = kzalloc_obj(eg_cache_entry); if (entry == NULL) { pr_info("out of memory\n"); diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c index 133b0cda7063..2574aae3e066 100644 --- a/net/atm/pppoatm.c +++ b/net/atm/pppoatm.c @@ -397,7 +397,7 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg) if (be.encaps != PPPOATM_ENCAPS_AUTODETECT && be.encaps != PPPOATM_ENCAPS_VC && be.encaps != PPPOATM_ENCAPS_LLC) return -EINVAL; - pvcc = kzalloc_obj(*pvcc, GFP_KERNEL); + pvcc = kzalloc_obj(*pvcc); if (pvcc == NULL) return -ENOMEM; pvcc->atmvcc = atmvcc; diff --git a/net/atm/resources.c b/net/atm/resources.c index 9849521feaf3..939452a610c0 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c @@ -36,7 +36,7 @@ static struct atm_dev *__alloc_atm_dev(const char *type) { struct atm_dev *dev; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return NULL; dev->type = type; |
