summaryrefslogtreecommitdiff
path: root/drivers/char/ipmi
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/char/ipmi
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-next-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 'drivers/char/ipmi')
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c4
-rw-r--r--drivers/char/ipmi/ipmi_dmi.c2
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c10
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c2
-rw-r--r--drivers/char/ipmi/ipmi_ssif.c6
-rw-r--r--drivers/char/ipmi/kcs_bmc_serio.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index c8a4f261bd58..38d0f1bc10b0 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -90,7 +90,7 @@ static int ipmi_open(struct inode *inode, struct file *file)
int rv;
struct ipmi_file_private *priv;
- priv = kmalloc_obj(*priv, GFP_KERNEL);
+ priv = kmalloc_obj(*priv);
if (!priv)
return -ENOMEM;
@@ -813,7 +813,7 @@ static void ipmi_new_smi(int if_num, struct device *device)
dev_t dev = MKDEV(ipmi_major, if_num);
struct ipmi_reg_list *entry;
- entry = kmalloc_obj(*entry, GFP_KERNEL);
+ entry = kmalloc_obj(*entry);
if (!entry) {
pr_err("ipmi_devintf: Unable to create the ipmi class device link\n");
return;
diff --git a/drivers/char/ipmi/ipmi_dmi.c b/drivers/char/ipmi/ipmi_dmi.c
index 2462d2557331..505e32911c34 100644
--- a/drivers/char/ipmi/ipmi_dmi.c
+++ b/drivers/char/ipmi/ipmi_dmi.c
@@ -74,7 +74,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
p.slave_addr = slave_addr;
p.addr_source = SI_SMBIOS;
- info = kmalloc_obj(*info, GFP_KERNEL);
+ info = kmalloc_obj(*info);
if (!info) {
pr_warn("Could not allocate dmi info\n");
} else {
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index b4f05d15d2df..c530966c4e07 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -761,11 +761,11 @@ int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher)
list_for_each_entry(intf, &ipmi_interfaces, link)
count++;
if (count > 0) {
- interfaces = kmalloc_objs(*interfaces, count, GFP_KERNEL);
+ interfaces = kmalloc_objs(*interfaces, count);
if (!interfaces) {
rv = -ENOMEM;
} else {
- devices = kmalloc_objs(*devices, count, GFP_KERNEL);
+ devices = kmalloc_objs(*devices, count);
if (!devices) {
kfree(interfaces);
interfaces = NULL;
@@ -1684,7 +1684,7 @@ int ipmi_register_for_cmd(struct ipmi_user *user,
if (!user)
return -ENODEV;
- rcvr = kmalloc_obj(*rcvr, GFP_KERNEL);
+ rcvr = kmalloc_obj(*rcvr);
if (!rcvr) {
rv = -ENOMEM;
goto out_release;
@@ -3144,7 +3144,7 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf,
bmc->id.product_id,
bmc->id.device_id);
} else {
- bmc = kzalloc_obj(*bmc, GFP_KERNEL);
+ bmc = kzalloc_obj(*bmc);
if (!bmc) {
rv = -ENOMEM;
goto out;
@@ -3580,7 +3580,7 @@ int ipmi_add_smi(struct module *owner,
if (rv)
return rv;
- intf = kzalloc_obj(*intf, GFP_KERNEL);
+ intf = kzalloc_obj(*intf);
if (!intf)
return -ENOMEM;
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index c6137eb56548..6bdf624c37ce 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1914,7 +1914,7 @@ int ipmi_si_add_smi(struct si_sm_io *io)
}
}
- new_smi = kzalloc_obj(*new_smi, GFP_KERNEL);
+ new_smi = kzalloc_obj(*new_smi);
if (!new_smi)
return -ENOMEM;
spin_lock_init(&new_smi->si_lock);
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index 579cf30cd52f..37a5cb5c53f1 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1602,7 +1602,7 @@ static int ssif_add_infos(struct i2c_client *client)
{
struct ssif_addr_info *info;
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
return -ENOMEM;
info->addr_src = SI_ACPI;
@@ -1667,7 +1667,7 @@ static int ssif_probe(struct i2c_client *client)
return -ENOMEM;
}
- ssif_info = kzalloc_obj(*ssif_info, GFP_KERNEL);
+ ssif_info = kzalloc_obj(*ssif_info);
if (!ssif_info) {
kfree(resp);
mutex_unlock(&ssif_infos_mutex);
@@ -1948,7 +1948,7 @@ static int new_ssif_client(int addr, char *adapter_name,
goto out_unlock;
}
- addr_info = kzalloc_obj(*addr_info, GFP_KERNEL);
+ addr_info = kzalloc_obj(*addr_info);
if (!addr_info) {
rv = -ENOMEM;
goto out_unlock;
diff --git a/drivers/char/ipmi/kcs_bmc_serio.c b/drivers/char/ipmi/kcs_bmc_serio.c
index 4c3a70dc7425..1a95d6f258ea 100644
--- a/drivers/char/ipmi/kcs_bmc_serio.c
+++ b/drivers/char/ipmi/kcs_bmc_serio.c
@@ -77,7 +77,7 @@ static int kcs_bmc_serio_add_device(struct kcs_bmc_device *kcs_bmc)
return -ENOMEM;
/* Use kzalloc() as the allocation is cleaned up with kfree() via serio_unregister_port() */
- port = kzalloc_obj(*port, GFP_KERNEL);
+ port = kzalloc_obj(*port);
if (!port)
return -ENOMEM;