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/ax25 | |
| 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 'net/ax25')
| -rw-r--r-- | net/ax25/af_ax25.c | 2 | ||||
| -rw-r--r-- | net/ax25/ax25_dev.c | 2 | ||||
| -rw-r--r-- | net/ax25/ax25_uid.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 855ae9df824d..a76f4793aed2 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -1249,7 +1249,7 @@ static int __must_check ax25_connect(struct socket *sock, goto out_release; } - if ((digi = kmalloc_obj(ax25_digi, GFP_KERNEL)) == NULL) { + if ((digi = kmalloc_obj(ax25_digi)) == NULL) { err = -ENOBUFS; goto out_release; } diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c index 56f605ddd88d..3c0544fc4ad5 100644 --- a/net/ax25/ax25_dev.c +++ b/net/ax25/ax25_dev.c @@ -54,7 +54,7 @@ void ax25_dev_device_up(struct net_device *dev) { ax25_dev *ax25_dev; - ax25_dev = kzalloc_obj(*ax25_dev, GFP_KERNEL); + ax25_dev = kzalloc_obj(*ax25_dev); if (!ax25_dev) { printk(KERN_ERR "AX.25: ax25_dev_device_up - out of memory\n"); return; diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index 95c5915f1ab9..159ce74273f0 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c @@ -101,7 +101,7 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) } if (sax->sax25_uid == 0) return -EINVAL; - if ((ax25_uid = kmalloc_obj(*ax25_uid, GFP_KERNEL)) == NULL) + if ((ax25_uid = kmalloc_obj(*ax25_uid)) == NULL) return -ENOMEM; refcount_set(&ax25_uid->refcount, 1); |
