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/vmw_vsock | |
| 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 'net/vmw_vsock')
| -rw-r--r-- | net/vmw_vsock/hyperv_transport.c | 4 | ||||
| -rw-r--r-- | net/vmw_vsock/virtio_transport.c | 2 | ||||
| -rw-r--r-- | net/vmw_vsock/virtio_transport_common.c | 2 | ||||
| -rw-r--r-- | net/vmw_vsock/vmci_transport.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c index b1bf64b5cc97..069386a74557 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -444,7 +444,7 @@ static int hvs_sock_init(struct vsock_sock *vsk, struct vsock_sock *psk) struct hvsock *hvs; struct sock *sk = sk_vsock(vsk); - hvs = kzalloc_obj(*hvs, GFP_KERNEL); + hvs = kzalloc_obj(*hvs); if (!hvs) return -ENOMEM; @@ -655,7 +655,7 @@ static ssize_t hvs_stream_enqueue(struct vsock_sock *vsk, struct msghdr *msg, BUILD_BUG_ON(sizeof(*send_buf) != HV_HYP_PAGE_SIZE); - send_buf = kmalloc_obj(*send_buf, GFP_KERNEL); + send_buf = kmalloc_obj(*send_buf); if (!send_buf) return -ENOMEM; diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index d6c07334bf94..77fe5b7b066c 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -805,7 +805,7 @@ static int virtio_vsock_probe(struct virtio_device *vdev) goto out; } - vsock = kzalloc_obj(*vsock, GFP_KERNEL); + vsock = kzalloc_obj(*vsock); if (!vsock) { ret = -ENOMEM; goto out; diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 925ed086058c..8a9fb23c6e85 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -920,7 +920,7 @@ int virtio_transport_do_socket_init(struct vsock_sock *vsk, { struct virtio_vsock_sock *vvs; - vvs = kzalloc_obj(*vvs, GFP_KERNEL); + vvs = kzalloc_obj(*vvs); if (!vvs) return -ENOMEM; diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c index 3e80639b7c08..4296ca1183f1 100644 --- a/net/vmw_vsock/vmci_transport.c +++ b/net/vmw_vsock/vmci_transport.c @@ -262,7 +262,7 @@ vmci_transport_alloc_send_control_pkt(struct sockaddr_vm *src, struct vmci_transport_packet *pkt; int err; - pkt = kmalloc_obj(*pkt, GFP_KERNEL); + pkt = kmalloc_obj(*pkt); if (!pkt) return -ENOMEM; @@ -1583,7 +1583,7 @@ static int vmci_transport_recv_connected(struct sock *sk, static int vmci_transport_socket_init(struct vsock_sock *vsk, struct vsock_sock *psk) { - vsk->trans = kmalloc_obj(struct vmci_transport, GFP_KERNEL); + vsk->trans = kmalloc_obj(struct vmci_transport); if (!vsk->trans) return -ENOMEM; |
