summaryrefslogtreecommitdiff
path: root/drivers/base/firmware_loader
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/base/firmware_loader
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
lwn-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/base/firmware_loader')
-rw-r--r--drivers/base/firmware_loader/main.c2
-rw-r--r--drivers/base/firmware_loader/sysfs.c2
-rw-r--r--drivers/base/firmware_loader/sysfs_upload.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
index 49eabc50c66d..a11b30dda23b 100644
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -747,7 +747,7 @@ _request_firmware_prepare(struct firmware **firmware_p, const char *name,
struct fw_priv *fw_priv;
int ret;
- *firmware_p = firmware = kzalloc_obj(*firmware, GFP_KERNEL);
+ *firmware_p = firmware = kzalloc_obj(*firmware);
if (!firmware) {
dev_err(device, "%s: kmalloc(struct firmware) failed\n",
__func__);
diff --git a/drivers/base/firmware_loader/sysfs.c b/drivers/base/firmware_loader/sysfs.c
index d921570026cc..29a10d2ad537 100644
--- a/drivers/base/firmware_loader/sysfs.c
+++ b/drivers/base/firmware_loader/sysfs.c
@@ -405,7 +405,7 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
struct fw_sysfs *fw_sysfs;
struct device *f_dev;
- fw_sysfs = kzalloc_obj(*fw_sysfs, GFP_KERNEL);
+ fw_sysfs = kzalloc_obj(*fw_sysfs);
if (!fw_sysfs) {
fw_sysfs = ERR_PTR(-ENOMEM);
goto exit;
diff --git a/drivers/base/firmware_loader/sysfs_upload.c b/drivers/base/firmware_loader/sysfs_upload.c
index fdc928b8cd1d..f59a7856934c 100644
--- a/drivers/base/firmware_loader/sysfs_upload.c
+++ b/drivers/base/firmware_loader/sysfs_upload.c
@@ -315,13 +315,13 @@ firmware_upload_register(struct module *module, struct device *parent,
if (!try_module_get(module))
return ERR_PTR(-EFAULT);
- fw_upload = kzalloc_obj(*fw_upload, GFP_KERNEL);
+ fw_upload = kzalloc_obj(*fw_upload);
if (!fw_upload) {
ret = -ENOMEM;
goto exit_module_put;
}
- fw_upload_priv = kzalloc_obj(*fw_upload_priv, GFP_KERNEL);
+ fw_upload_priv = kzalloc_obj(*fw_upload_priv);
if (!fw_upload_priv) {
ret = -ENOMEM;
goto free_fw_upload;