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/usb/usbip | |
| 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 'drivers/usb/usbip')
| -rw-r--r-- | drivers/usb/usbip/stub_dev.c | 2 | ||||
| -rw-r--r-- | drivers/usb/usbip/stub_rx.c | 2 | ||||
| -rw-r--r-- | drivers/usb/usbip/stub_tx.c | 2 | ||||
| -rw-r--r-- | drivers/usb/usbip/vhci_hcd.c | 2 | ||||
| -rw-r--r-- | drivers/usb/usbip/vhci_tx.c | 2 | ||||
| -rw-r--r-- | drivers/usb/usbip/vudc_dev.c | 8 | ||||
| -rw-r--r-- | drivers/usb/usbip/vudc_tx.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/usbip/stub_dev.c b/drivers/usb/usbip/stub_dev.c index e859c51c94e8..34990b7e2d18 100644 --- a/drivers/usb/usbip/stub_dev.c +++ b/drivers/usb/usbip/stub_dev.c @@ -263,7 +263,7 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev) dev_dbg(&udev->dev, "allocating stub device"); /* yes, it's a new device */ - sdev = kzalloc_obj(struct stub_device, GFP_KERNEL); + sdev = kzalloc_obj(struct stub_device); if (!sdev) return NULL; diff --git a/drivers/usb/usbip/stub_rx.c b/drivers/usb/usbip/stub_rx.c index 7df83464a75f..1e9ae578810d 100644 --- a/drivers/usb/usbip/stub_rx.c +++ b/drivers/usb/usbip/stub_rx.c @@ -535,7 +535,7 @@ static void stub_recv_cmd_submit(struct stub_device *sdev, /* allocate urb array */ priv->num_urbs = num_urbs; - priv->urbs = kmalloc_objs(*priv->urbs, num_urbs, GFP_KERNEL); + priv->urbs = kmalloc_objs(*priv->urbs, num_urbs); if (!priv->urbs) goto err_urbs; diff --git a/drivers/usb/usbip/stub_tx.c b/drivers/usb/usbip/stub_tx.c index 9e6187c3ddb0..4ffd342250b5 100644 --- a/drivers/usb/usbip/stub_tx.c +++ b/drivers/usb/usbip/stub_tx.c @@ -191,7 +191,7 @@ static int stub_send_ret_submit(struct stub_device *sdev) else iovnum = 2; - iov = kzalloc_objs(struct kvec, iovnum, GFP_KERNEL); + iov = kzalloc_objs(struct kvec, iovnum); if (!iov) { usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_MALLOC); diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c index 4dcda9e8316f..39e8faf4c18c 100644 --- a/drivers/usb/usbip/vhci_hcd.c +++ b/drivers/usb/usbip/vhci_hcd.c @@ -1537,7 +1537,7 @@ static int __init vhci_hcd_init(void) if (vhci_num_controllers < 1) vhci_num_controllers = 1; - vhcis = kzalloc_objs(struct vhci, vhci_num_controllers, GFP_KERNEL); + vhcis = kzalloc_objs(struct vhci, vhci_num_controllers); if (vhcis == NULL) return -ENOMEM; diff --git a/drivers/usb/usbip/vhci_tx.c b/drivers/usb/usbip/vhci_tx.c index a63805d57d94..32e6fabccf72 100644 --- a/drivers/usb/usbip/vhci_tx.c +++ b/drivers/usb/usbip/vhci_tx.c @@ -82,7 +82,7 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) else iovnum = 3; - iov = kzalloc_objs(*iov, iovnum, GFP_KERNEL); + iov = kzalloc_objs(*iov, iovnum); if (!iov) { usbip_event_add(&vdev->ud, SDEV_EVENT_ERROR_MALLOC); return -ENOMEM; diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c index 80ab3d019b87..90383107b660 100644 --- a/drivers/usb/usbip/vudc_dev.c +++ b/drivers/usb/usbip/vudc_dev.c @@ -43,7 +43,7 @@ struct urbp *alloc_urbp(void) { struct urbp *urb_p; - urb_p = kzalloc_obj(*urb_p, GFP_KERNEL); + urb_p = kzalloc_obj(*urb_p); if (!urb_p) return urb_p; @@ -491,7 +491,7 @@ struct vudc_device *alloc_vudc_device(int devid) { struct vudc_device *udc_dev; - udc_dev = kzalloc_obj(*udc_dev, GFP_KERNEL); + udc_dev = kzalloc_obj(*udc_dev); if (!udc_dev) return NULL; @@ -518,7 +518,7 @@ static int init_vudc_hw(struct vudc *udc) struct usbip_device *ud = &udc->ud; struct vep *ep; - udc->ep = kzalloc_objs(*udc->ep, VIRTUAL_ENDPOINTS, GFP_KERNEL); + udc->ep = kzalloc_objs(*udc->ep, VIRTUAL_ENDPOINTS); if (!udc->ep) goto nomem_ep; @@ -598,7 +598,7 @@ int vudc_probe(struct platform_device *pdev) struct vudc *udc; int ret = -ENOMEM; - udc = kzalloc_obj(*udc, GFP_KERNEL); + udc = kzalloc_obj(*udc); if (!udc) goto out; diff --git a/drivers/usb/usbip/vudc_tx.c b/drivers/usb/usbip/vudc_tx.c index b4b7796319f1..88edfbcc0035 100644 --- a/drivers/usb/usbip/vudc_tx.c +++ b/drivers/usb/usbip/vudc_tx.c @@ -97,7 +97,7 @@ static int v_send_ret_submit(struct vudc *udc, struct urbp *urb_p) else iovnum = 2; - iov = kzalloc_objs(*iov, iovnum, GFP_KERNEL); + iov = kzalloc_objs(*iov, iovnum); if (!iov) { usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_MALLOC); ret = -ENOMEM; |
