summaryrefslogtreecommitdiff
path: root/drivers/hv
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 /drivers/hv
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 'drivers/hv')
-rw-r--r--drivers/hv/hv_kvp.c4
-rw-r--r--drivers/hv/hv_proc.c2
-rw-r--r--drivers/hv/hv_snapshot.c4
-rw-r--r--drivers/hv/hv_utils_transport.c2
-rw-r--r--drivers/hv/mshv_debugfs.c2
-rw-r--r--drivers/hv/mshv_eventfd.c4
-rw-r--r--drivers/hv/mshv_root_main.c6
-rw-r--r--drivers/hv/mshv_synic.c2
-rw-r--r--drivers/hv/mshv_vtl_main.c6
-rw-r--r--drivers/hv/vmbus_drv.c6
10 files changed, 19 insertions, 19 deletions
diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c
index 29ef1dc5c184..0d73daf745a7 100644
--- a/drivers/hv/hv_kvp.c
+++ b/drivers/hv/hv_kvp.c
@@ -134,7 +134,7 @@ kvp_register(int reg_value)
struct hv_kvp_msg *kvp_msg;
char *version;
- kvp_msg = kzalloc_obj(*kvp_msg, GFP_KERNEL);
+ kvp_msg = kzalloc_obj(*kvp_msg);
if (kvp_msg) {
version = kvp_msg->body.kvp_register.version;
@@ -385,7 +385,7 @@ kvp_send_key(struct work_struct *dummy)
if (kvp_transaction.state != HVUTIL_HOSTMSG_RECEIVED)
return;
- message = kzalloc_obj(*message, GFP_KERNEL);
+ message = kzalloc_obj(*message);
if (!message)
return;
diff --git a/drivers/hv/hv_proc.c b/drivers/hv/hv_proc.c
index 216a0e8fd15b..3cb4b2a3035c 100644
--- a/drivers/hv/hv_proc.c
+++ b/drivers/hv/hv_proc.c
@@ -40,7 +40,7 @@ int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages)
return -ENOMEM;
pages = page_address(page);
- counts = kzalloc_objs(int, HV_DEPOSIT_MAX, GFP_KERNEL);
+ counts = kzalloc_objs(int, HV_DEPOSIT_MAX);
if (!counts) {
free_page((unsigned long)pages);
return -ENOMEM;
diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c
index 50f9348789ee..506871aeacf0 100644
--- a/drivers/hv/hv_snapshot.c
+++ b/drivers/hv/hv_snapshot.c
@@ -184,7 +184,7 @@ static void vss_send_op(void)
return;
}
- vss_msg = kzalloc_obj(*vss_msg, GFP_KERNEL);
+ vss_msg = kzalloc_obj(*vss_msg);
if (!vss_msg)
return;
@@ -424,7 +424,7 @@ int hv_vss_pre_suspend(void)
* write() will fail with EINVAL (see vss_on_msg()), and the daemon
* will reset the device by closing and re-opening it.
*/
- vss_msg = kzalloc_obj(*vss_msg, GFP_KERNEL);
+ vss_msg = kzalloc_obj(*vss_msg);
if (!vss_msg)
return -ENOMEM;
diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c
index 43b7ffae8852..c3be5c570263 100644
--- a/drivers/hv/hv_utils_transport.c
+++ b/drivers/hv/hv_utils_transport.c
@@ -274,7 +274,7 @@ struct hvutil_transport *hvutil_transport_init(const char *name,
{
struct hvutil_transport *hvt;
- hvt = kzalloc_obj(*hvt, GFP_KERNEL);
+ hvt = kzalloc_obj(*hvt);
if (!hvt)
return NULL;
diff --git a/drivers/hv/mshv_debugfs.c b/drivers/hv/mshv_debugfs.c
index 6a080d728836..418b6dc8f3c2 100644
--- a/drivers/hv/mshv_debugfs.c
+++ b/drivers/hv/mshv_debugfs.c
@@ -511,7 +511,7 @@ static int __init mshv_debugfs_parent_partition_create(void)
if (err)
goto remove_debugfs_partition;
- parent_vp_stats = kzalloc_objs(*parent_vp_stats, nr_cpu_ids, GFP_KERNEL);
+ parent_vp_stats = kzalloc_objs(*parent_vp_stats, nr_cpu_ids);
if (!parent_vp_stats) {
err = -ENOMEM;
goto remove_debugfs_partition;
diff --git a/drivers/hv/mshv_eventfd.c b/drivers/hv/mshv_eventfd.c
index 5b3c09f08a1e..d8471546e6a0 100644
--- a/drivers/hv/mshv_eventfd.c
+++ b/drivers/hv/mshv_eventfd.c
@@ -394,7 +394,7 @@ static int mshv_irqfd_assign(struct mshv_partition *pt,
CLASS(fd, f)(args->fd);
- irqfd = kzalloc_obj(*irqfd, GFP_KERNEL);
+ irqfd = kzalloc_obj(*irqfd);
if (!irqfd)
return -ENOMEM;
@@ -707,7 +707,7 @@ static int mshv_assign_ioeventfd(struct mshv_partition *pt,
if (IS_ERR(eventfd))
return PTR_ERR(eventfd);
- p = kzalloc_obj(*p, GFP_KERNEL);
+ p = kzalloc_obj(*p);
if (!p) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c
index 4715d23d22f2..82ff823ef0ca 100644
--- a/drivers/hv/mshv_root_main.c
+++ b/drivers/hv/mshv_root_main.c
@@ -713,7 +713,7 @@ mshv_vp_ioctl_get_set_state_pfn(struct mshv_vp *vp,
return -EOVERFLOW;
/* Pin user pages so hypervisor can copy directly to them */
- pages = kzalloc_objs(struct page *, page_count, GFP_KERNEL);
+ pages = kzalloc_objs(struct page *, page_count);
if (!pages)
return -ENOMEM;
@@ -1072,7 +1072,7 @@ mshv_partition_ioctl_create_vp(struct mshv_partition *partition,
if (ret)
goto unmap_ghcb_page;
- vp = kzalloc_obj(*vp, GFP_KERNEL);
+ vp = kzalloc_obj(*vp);
if (!vp)
goto unmap_stats_pages;
@@ -1977,7 +1977,7 @@ mshv_ioctl_create_partition(void __user *user_arg, struct device *module_dev)
if (ret)
return ret;
- partition = kzalloc_obj(*partition, GFP_KERNEL);
+ partition = kzalloc_obj(*partition);
if (!partition)
return -ENOMEM;
diff --git a/drivers/hv/mshv_synic.c b/drivers/hv/mshv_synic.c
index 49e3a59ffb90..216065e21d28 100644
--- a/drivers/hv/mshv_synic.c
+++ b/drivers/hv/mshv_synic.c
@@ -605,7 +605,7 @@ mshv_register_doorbell(u64 partition_id, doorbell_cb_t doorbell_cb, void *data,
union hv_port_id port_id = { 0 };
int ret;
- port_table_info = kmalloc_obj(*port_table_info, GFP_KERNEL);
+ port_table_info = kmalloc_obj(*port_table_info);
if (!port_table_info)
return -ENOMEM;
diff --git a/drivers/hv/mshv_vtl_main.c b/drivers/hv/mshv_vtl_main.c
index 916021a175f3..5856975f32e1 100644
--- a/drivers/hv/mshv_vtl_main.c
+++ b/drivers/hv/mshv_vtl_main.c
@@ -117,7 +117,7 @@ mshv_ioctl_create_vtl(void __user *user_arg, struct device *module_dev)
struct file *file;
int fd;
- vtl = kzalloc_obj(*vtl, GFP_KERNEL);
+ vtl = kzalloc_obj(*vtl);
if (!vtl)
return -ENOMEM;
@@ -393,7 +393,7 @@ static int mshv_vtl_ioctl_add_vtl0_mem(struct mshv_vtl *vtl, void __user *arg)
return -EFAULT;
}
- pgmap = kzalloc_obj(*pgmap, GFP_KERNEL);
+ pgmap = kzalloc_obj(*pgmap);
if (!pgmap)
return -ENOMEM;
@@ -1344,7 +1344,7 @@ static int __init mshv_vtl_init(void)
/*
* "mshv vtl mem dev" device is later used to setup VTL0 memory.
*/
- mem_dev = kzalloc_obj(*mem_dev, GFP_KERNEL);
+ mem_dev = kzalloc_obj(*mem_dev);
if (!mem_dev) {
ret = -ENOMEM;
goto free_low;
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 3119f68fd27b..bc4fc1951ae1 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -756,7 +756,7 @@ static int vmbus_add_dynid(struct hv_driver *drv, guid_t *guid)
{
struct vmbus_dynid *dynid;
- dynid = kzalloc_obj(*dynid, GFP_KERNEL);
+ dynid = kzalloc_obj(*dynid);
if (!dynid)
return -ENOMEM;
@@ -2156,7 +2156,7 @@ struct hv_device *vmbus_device_create(const guid_t *type,
{
struct hv_device *child_device_obj;
- child_device_obj = kzalloc_obj(struct hv_device, GFP_KERNEL);
+ child_device_obj = kzalloc_obj(struct hv_device);
if (!child_device_obj) {
pr_err("Unable to allocate device object for child device\n");
return NULL;
@@ -2672,7 +2672,7 @@ static int vmbus_device_add(struct platform_device *pdev)
for_each_of_range(&parser, &range) {
struct resource *res;
- res = kzalloc_obj(*res, GFP_KERNEL);
+ res = kzalloc_obj(*res);
if (!res) {
vmbus_mmio_remove();
return -ENOMEM;