summaryrefslogtreecommitdiff
path: root/arch/um
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /arch/um
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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 'arch/um')
-rw-r--r--arch/um/drivers/hostaudio_kern.c4
-rw-r--r--arch/um/drivers/line.c2
-rw-r--r--arch/um/drivers/port_kern.c4
-rw-r--r--arch/um/drivers/vector_kern.c4
-rw-r--r--arch/um/drivers/vector_transports.c4
-rw-r--r--arch/um/drivers/vfio_kern.c4
-rw-r--r--arch/um/drivers/virtio_pcidev.c2
-rw-r--r--arch/um/drivers/virtio_uml.c4
-rw-r--r--arch/um/drivers/xterm_kern.c2
9 files changed, 15 insertions, 15 deletions
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c
index 6983a35a9ead..7ce98f148eb3 100644
--- a/arch/um/drivers/hostaudio_kern.c
+++ b/arch/um/drivers/hostaudio_kern.c
@@ -186,7 +186,7 @@ static int hostaudio_open(struct inode *inode, struct file *file)
kernel_param_unlock(THIS_MODULE);
#endif
- state = kmalloc_obj(struct hostaudio_state, GFP_KERNEL);
+ state = kmalloc_obj(struct hostaudio_state);
if (state == NULL)
return -ENOMEM;
@@ -247,7 +247,7 @@ static int hostmixer_open_mixdev(struct inode *inode, struct file *file)
printk(KERN_DEBUG "hostmixer: open called (host: %s)\n", mixer);
#endif
- state = kmalloc_obj(struct hostmixer_state, GFP_KERNEL);
+ state = kmalloc_obj(struct hostmixer_state);
if (state == NULL)
return -ENOMEM;
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 62545319d0eb..c851a592809c 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -672,7 +672,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_port *port,
{
struct winch *winch;
- winch = kmalloc_obj(*winch, GFP_KERNEL);
+ winch = kmalloc_obj(*winch);
if (winch == NULL) {
printk(KERN_ERR "register_winch_irq - kmalloc failed\n");
goto cleanup;
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c
index c51d6ca4de70..7b3ff4af1db6 100644
--- a/arch/um/drivers/port_kern.c
+++ b/arch/um/drivers/port_kern.c
@@ -170,7 +170,7 @@ void *port_data(int port_num)
if (port->port == port_num)
goto found;
}
- port = kmalloc_obj(struct port_list, GFP_KERNEL);
+ port = kmalloc_obj(struct port_list);
if (port == NULL) {
printk(KERN_ERR "Allocation of port list failed\n");
goto out;
@@ -202,7 +202,7 @@ void *port_data(int port_num)
list_add(&port->list, &ports);
found:
- dev = kmalloc_obj(struct port_dev, GFP_KERNEL);
+ dev = kmalloc_obj(struct port_dev);
if (dev == NULL) {
printk(KERN_ERR "Allocation of port device entry failed\n");
goto out;
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 8882ad7c983a..5434c87542e5 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -515,7 +515,7 @@ static struct vector_queue *create_queue(
struct iovec *iov;
struct mmsghdr *mmsg_vector;
- result = kmalloc_obj(struct vector_queue, GFP_KERNEL);
+ result = kmalloc_obj(struct vector_queue);
if (result == NULL)
return NULL;
result->max_depth = max_size;
@@ -1583,7 +1583,7 @@ static void vector_eth_configure(
struct vector_private *vp;
int err;
- device = kzalloc_obj(*device, GFP_KERNEL);
+ device = kzalloc_obj(*device);
if (device == NULL) {
pr_err("Failed to allocate struct vector_device for vec%d\n", n);
return;
diff --git a/arch/um/drivers/vector_transports.c b/arch/um/drivers/vector_transports.c
index da5d2083ed49..ddd127ee9678 100644
--- a/arch/um/drivers/vector_transports.c
+++ b/arch/um/drivers/vector_transports.c
@@ -245,7 +245,7 @@ static int build_gre_transport_data(struct vector_private *vp)
int temp_rx;
int temp_tx;
- vp->transport_data = kmalloc_obj(struct uml_gre_data, GFP_KERNEL);
+ vp->transport_data = kmalloc_obj(struct uml_gre_data);
if (vp->transport_data == NULL)
return -ENOMEM;
td = vp->transport_data;
@@ -307,7 +307,7 @@ static int build_l2tpv3_transport_data(struct vector_private *vp)
unsigned long temp_rx;
unsigned long temp_tx;
- vp->transport_data = kmalloc_obj(struct uml_l2tpv3_data, GFP_KERNEL);
+ vp->transport_data = kmalloc_obj(struct uml_l2tpv3_data);
if (vp->transport_data == NULL)
return -ENOMEM;
diff --git a/arch/um/drivers/vfio_kern.c b/arch/um/drivers/vfio_kern.c
index 5f349be2fce7..7b6492174da0 100644
--- a/arch/um/drivers/vfio_kern.c
+++ b/arch/um/drivers/vfio_kern.c
@@ -107,7 +107,7 @@ static int uml_vfio_open_group(int group_id)
}
}
- group = kzalloc_obj(*group, GFP_KERNEL);
+ group = kzalloc_obj(*group);
if (!group)
return -ENOMEM;
@@ -599,7 +599,7 @@ static struct uml_vfio_device *uml_vfio_add_device(const char *device)
if (uml_vfio_find_device(device))
return ERR_PTR(-EEXIST);
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev)
return ERR_PTR(-ENOMEM);
diff --git a/arch/um/drivers/virtio_pcidev.c b/arch/um/drivers/virtio_pcidev.c
index 5db9a4461766..2bf5a645db45 100644
--- a/arch/um/drivers/virtio_pcidev.c
+++ b/arch/um/drivers/virtio_pcidev.c
@@ -537,7 +537,7 @@ static int virtio_pcidev_virtio_probe(struct virtio_device *vdev)
struct virtio_pcidev_device *dev;
int err;
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev)
return -ENOMEM;
diff --git a/arch/um/drivers/virtio_uml.c b/arch/um/drivers/virtio_uml.c
index ac269e6148fc..7425a8548141 100644
--- a/arch/um/drivers/virtio_uml.c
+++ b/arch/um/drivers/virtio_uml.c
@@ -965,7 +965,7 @@ static struct virtqueue *vu_setup_vq(struct virtio_device *vdev,
int num = MAX_SUPPORTED_QUEUE_SIZE;
int rc;
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info) {
rc = -ENOMEM;
goto error_kzalloc;
@@ -1217,7 +1217,7 @@ static int virtio_uml_probe(struct platform_device *pdev)
return PTR_ERR(pdata);
}
- vu_dev = kzalloc_obj(*vu_dev, GFP_KERNEL);
+ vu_dev = kzalloc_obj(*vu_dev);
if (!vu_dev)
return -ENOMEM;
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c
index 7740d9a3b090..d630cb19e14a 100644
--- a/arch/um/drivers/xterm_kern.c
+++ b/arch/um/drivers/xterm_kern.c
@@ -45,7 +45,7 @@ int xterm_fd(int socket, int *pid_out)
struct xterm_wait *data;
int err, ret;
- data = kmalloc_obj(*data, GFP_KERNEL);
+ data = kmalloc_obj(*data);
if (data == NULL) {
printk(KERN_ERR "xterm_fd : failed to allocate xterm_wait\n");
return -ENOMEM;