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/most | |
| 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/most')
| -rw-r--r-- | drivers/most/configfs.c | 6 | ||||
| -rw-r--r-- | drivers/most/core.c | 6 | ||||
| -rw-r--r-- | drivers/most/most_cdev.c | 2 | ||||
| -rw-r--r-- | drivers/most/most_snd.c | 4 | ||||
| -rw-r--r-- | drivers/most/most_usb.c | 12 |
5 files changed, 15 insertions, 15 deletions
diff --git a/drivers/most/configfs.c b/drivers/most/configfs.c index 03b977a4c070..8f5158d95bc3 100644 --- a/drivers/most/configfs.c +++ b/drivers/most/configfs.c @@ -426,7 +426,7 @@ static struct config_item *most_common_make_item(struct config_group *group, struct mdev_link *mdev_link; struct most_common *mc = to_most_common(group->cg_subsys); - mdev_link = kzalloc_obj(*mdev_link, GFP_KERNEL); + mdev_link = kzalloc_obj(*mdev_link); if (!mdev_link) return ERR_PTR(-ENOMEM); @@ -526,7 +526,7 @@ static struct config_item *most_snd_grp_make_item(struct config_group *group, { struct mdev_link *mdev_link; - mdev_link = kzalloc_obj(*mdev_link, GFP_KERNEL); + mdev_link = kzalloc_obj(*mdev_link); if (!mdev_link) return ERR_PTR(-ENOMEM); @@ -607,7 +607,7 @@ static struct config_group *most_sound_make_group(struct config_group *group, } if (!try_module_get(ms->mod)) return ERR_PTR(-ENOLCK); - most = kzalloc_obj(*most, GFP_KERNEL); + most = kzalloc_obj(*most); if (!most) { module_put(ms->mod); return ERR_PTR(-ENOMEM); diff --git a/drivers/most/core.c b/drivers/most/core.c index 3bbe8bed402a..c2616da8bceb 100644 --- a/drivers/most/core.c +++ b/drivers/most/core.c @@ -880,7 +880,7 @@ static int arm_mbo_chain(struct most_channel *c, int dir, atomic_set(&c->mbo_nq_level, 0); for (i = 0; i < c->cfg.num_buffers; i++) { - mbo = kzalloc_obj(*mbo, GFP_KERNEL); + mbo = kzalloc_obj(*mbo); if (!mbo) goto flush_fifos; @@ -1300,7 +1300,7 @@ int most_register_interface(struct most_interface *iface) return id; } - iface->p = kzalloc_obj(*iface->p, GFP_KERNEL); + iface->p = kzalloc_obj(*iface->p); if (!iface->p) { ida_free(&mdev_id, id); put_device(iface->dev); @@ -1324,7 +1324,7 @@ int most_register_interface(struct most_interface *iface) for (i = 0; i < iface->num_channels; i++) { const char *name_suffix = iface->channel_vector[i].name_suffix; - c = kzalloc_obj(*c, GFP_KERNEL); + c = kzalloc_obj(*c); if (!c) goto err_free_resources; if (!name_suffix) diff --git a/drivers/most/most_cdev.c b/drivers/most/most_cdev.c index 87f770b03466..b31dc824466f 100644 --- a/drivers/most/most_cdev.c +++ b/drivers/most/most_cdev.c @@ -429,7 +429,7 @@ static int comp_probe(struct most_interface *iface, int channel_id, if (current_minor < 0) return current_minor; - c = kzalloc_obj(*c, GFP_KERNEL); + c = kzalloc_obj(*c); if (!c) { retval = -ENOMEM; goto err_remove_ida; diff --git a/drivers/most/most_snd.c b/drivers/most/most_snd.c index ffd51f2d0d9b..68b9e6c64033 100644 --- a/drivers/most/most_snd.c +++ b/drivers/most/most_snd.c @@ -542,7 +542,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, adpt->pcm_dev_idx++; goto skip_adpt_alloc; } - adpt = kzalloc_obj(*adpt, GFP_KERNEL); + adpt = kzalloc_obj(*adpt); if (!adpt) return -ENOMEM; @@ -574,7 +574,7 @@ skip_adpt_alloc: capture_count = 1; direction = SNDRV_PCM_STREAM_CAPTURE; } - channel = kzalloc_obj(*channel, GFP_KERNEL); + channel = kzalloc_obj(*channel); if (!channel) { ret = -ENOMEM; goto err_free_adpt; diff --git a/drivers/most/most_usb.c b/drivers/most/most_usb.c index 0c61d023ac0a..d2c0875727a3 100644 --- a/drivers/most/most_usb.c +++ b/drivers/most/most_usb.c @@ -142,7 +142,7 @@ static inline int drci_rd_reg(struct usb_device *dev, u16 reg, u16 *buf) __le16 *dma_buf; u8 req_type = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE; - dma_buf = kzalloc_obj(*dma_buf, GFP_KERNEL); + dma_buf = kzalloc_obj(*dma_buf); if (!dma_buf) return -ENOMEM; @@ -960,7 +960,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) struct usb_endpoint_descriptor *ep_desc; int ret = -ENOMEM; - mdev = kzalloc_obj(*mdev, GFP_KERNEL); + mdev = kzalloc_obj(*mdev); if (!mdev) return -ENOMEM; @@ -1000,11 +1000,11 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) mdev->dev.init_name = mdev->description; mdev->dev.parent = &interface->dev; mdev->dev.release = release_mdev; - mdev->conf = kzalloc_objs(*mdev->conf, num_endpoints, GFP_KERNEL); + mdev->conf = kzalloc_objs(*mdev->conf, num_endpoints); if (!mdev->conf) goto err_free_mdev; - mdev->cap = kzalloc_objs(*mdev->cap, num_endpoints, GFP_KERNEL); + mdev->cap = kzalloc_objs(*mdev->cap, num_endpoints); if (!mdev->cap) goto err_free_conf; @@ -1015,7 +1015,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) goto err_free_cap; mdev->busy_urbs = - kzalloc_objs(*mdev->busy_urbs, num_endpoints, GFP_KERNEL); + kzalloc_objs(*mdev->busy_urbs, num_endpoints); if (!mdev->busy_urbs) goto err_free_ep_address; @@ -1064,7 +1064,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) if (le16_to_cpu(usb_dev->descriptor.idProduct) == USB_DEV_ID_OS81118 || le16_to_cpu(usb_dev->descriptor.idProduct) == USB_DEV_ID_OS81119 || le16_to_cpu(usb_dev->descriptor.idProduct) == USB_DEV_ID_OS81210) { - mdev->dci = kzalloc_obj(*mdev->dci, GFP_KERNEL); + mdev->dci = kzalloc_obj(*mdev->dci); if (!mdev->dci) { mutex_unlock(&mdev->io_mutex); most_deregister_interface(&mdev->iface); |
