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/tty/hvc | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | lwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz lwn-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 'drivers/tty/hvc')
| -rw-r--r-- | drivers/tty/hvc/hvc_iucv.c | 2 | ||||
| -rw-r--r-- | drivers/tty/hvc/hvc_opal.c | 2 | ||||
| -rw-r--r-- | drivers/tty/hvc/hvc_vio.c | 2 | ||||
| -rw-r--r-- | drivers/tty/hvc/hvc_xen.c | 8 | ||||
| -rw-r--r-- | drivers/tty/hvc/hvcs.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c index 7fd3937d1396..1dcdb9e99bd8 100644 --- a/drivers/tty/hvc/hvc_iucv.c +++ b/drivers/tty/hvc/hvc_iucv.c @@ -1050,7 +1050,7 @@ static int __init hvc_iucv_alloc(int id, unsigned int is_console) char name[9]; int rc; - priv = kzalloc_obj(struct hvc_iucv_private, GFP_KERNEL); + priv = kzalloc_obj(struct hvc_iucv_private); if (!priv) return -ENOMEM; diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c index 72dfab77890c..402da9e7c534 100644 --- a/drivers/tty/hvc/hvc_opal.c +++ b/drivers/tty/hvc/hvc_opal.c @@ -181,7 +181,7 @@ static int hvc_opal_probe(struct platform_device *dev) pv = hvc_opal_privs[termno]; boot = 1; } else if (hvc_opal_privs[termno] == NULL) { - pv = kzalloc_obj(struct hvc_opal_priv, GFP_KERNEL); + pv = kzalloc_obj(struct hvc_opal_priv); if (!pv) return -ENOMEM; pv->proto = proto; diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c index 8725cc77c557..14c6a5564617 100644 --- a/drivers/tty/hvc/hvc_vio.c +++ b/drivers/tty/hvc/hvc_vio.c @@ -338,7 +338,7 @@ static int hvc_vio_probe(struct vio_dev *vdev, pr_devel("->non-boot console, using termno %d\n", termno); if (termno < 0) return -ENODEV; - pv = kzalloc_obj(struct hvterm_priv, GFP_KERNEL); + pv = kzalloc_obj(struct hvterm_priv); if (!pv) return -ENOMEM; pv->termno = vdev->unit_address; diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 138afdf3bbc4..7f0b6262488c 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -264,7 +264,7 @@ static int xen_hvm_console_init(void) info = vtermno_to_xencons(HVC_COOKIE); if (!info) { - info = kzalloc_obj(struct xencons_info, GFP_KERNEL); + info = kzalloc_obj(struct xencons_info); if (!info) return -ENOMEM; spin_lock_init(&info->ring_lock); @@ -328,7 +328,7 @@ static int xen_pv_console_init(void) info = vtermno_to_xencons(HVC_COOKIE); if (!info) { - info = kzalloc_obj(struct xencons_info, GFP_KERNEL); + info = kzalloc_obj(struct xencons_info); if (!info) return -ENOMEM; } else if (info->intf != NULL) { @@ -352,7 +352,7 @@ static int xen_initial_domain_console_init(void) info = vtermno_to_xencons(HVC_COOKIE); if (!info) { - info = kzalloc_obj(struct xencons_info, GFP_KERNEL); + info = kzalloc_obj(struct xencons_info); if (!info) return -ENOMEM; spin_lock_init(&info->ring_lock); @@ -513,7 +513,7 @@ static int xencons_probe(struct xenbus_device *dev, if (devid == 0) return -ENODEV; - info = kzalloc_obj(struct xencons_info, GFP_KERNEL); + info = kzalloc_obj(struct xencons_info); if (!info) return -ENOMEM; spin_lock_init(&info->ring_lock); diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 7ff3c87354b8..d32b1e3c50bf 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c @@ -748,7 +748,7 @@ static int hvcs_probe( return -EFAULT; } - hvcsd = kzalloc_obj(*hvcsd, GFP_KERNEL); + hvcsd = kzalloc_obj(*hvcsd); if (!hvcsd) return -ENODEV; @@ -1394,7 +1394,7 @@ static int hvcs_alloc_index_list(int n) { int i; - hvcs_index_list = kmalloc_objs(hvcs_index_count, n, GFP_KERNEL); + hvcs_index_list = kmalloc_objs(hvcs_index_count, n); if (!hvcs_index_list) return -ENOMEM; hvcs_index_count = n; |
