mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user