summaryrefslogtreecommitdiff
path: root/drivers/firewire
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/firewire
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/firewire')
-rw-r--r--drivers/firewire/core-cdev.c14
-rw-r--r--drivers/firewire/core-device.c2
-rw-r--r--drivers/firewire/net.c2
-rw-r--r--drivers/firewire/nosy.c4
-rw-r--r--drivers/firewire/sbp2.c2
5 files changed, 12 insertions, 12 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index 6d1a59e33d2e..c9b67bc720be 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -291,7 +291,7 @@ static int fw_device_op_open(struct inode *inode, struct file *file)
return -ENODEV;
}
- client = kzalloc_obj(*client, GFP_KERNEL);
+ client = kzalloc_obj(*client);
if (client == NULL) {
fw_device_put(device);
return -ENOMEM;
@@ -412,7 +412,7 @@ static void queue_bus_reset_event(struct client *client)
struct client_resource *resource;
unsigned long index;
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (e == NULL)
return;
@@ -837,7 +837,7 @@ static int ioctl_allocate(struct client *client, union ioctl_arg *arg)
struct fw_address_region region;
int ret;
- r = kmalloc_obj(*r, GFP_KERNEL);
+ r = kmalloc_obj(*r);
if (r == NULL)
return -ENOMEM;
@@ -1006,7 +1006,7 @@ static void iso_mc_callback(struct fw_iso_context *context,
struct client *client = data;
struct iso_interrupt_mc_event *e;
- e = kmalloc_obj(*e, GFP_KERNEL);
+ e = kmalloc_obj(*e);
if (e == NULL)
return;
@@ -1409,9 +1409,9 @@ static int init_iso_resource(struct client *client,
request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL)
return -EINVAL;
- r = kmalloc_obj(*r, GFP_KERNEL);
- e1 = kmalloc_obj(*e1, GFP_KERNEL);
- e2 = kmalloc_obj(*e2, GFP_KERNEL);
+ r = kmalloc_obj(*r);
+ e1 = kmalloc_obj(*e1);
+ e2 = kmalloc_obj(*e2);
if (r == NULL || e1 == NULL || e2 == NULL) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 3281f6c6bedb..c0f17da27a22 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -849,7 +849,7 @@ static void create_units(struct fw_device *device)
* Get the address of the unit directory and try to
* match the drivers id_tables against it.
*/
- unit = kzalloc_obj(*unit, GFP_KERNEL);
+ unit = kzalloc_obj(*unit);
if (unit == NULL)
continue;
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index b9f01e871fe3..f1a2bee39bf1 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -1402,7 +1402,7 @@ static int fwnet_add_peer(struct fwnet_device *dev,
{
struct fwnet_peer *peer;
- peer = kmalloc_obj(*peer, GFP_KERNEL);
+ peer = kmalloc_obj(*peer);
if (!peer)
return -ENOMEM;
diff --git a/drivers/firewire/nosy.c b/drivers/firewire/nosy.c
index 547d560f353f..900b7d904b41 100644
--- a/drivers/firewire/nosy.c
+++ b/drivers/firewire/nosy.c
@@ -281,7 +281,7 @@ nosy_open(struct inode *inode, struct file *file)
if (lynx == NULL)
return -ENODEV;
- client = kmalloc_obj(*client, GFP_KERNEL);
+ client = kmalloc_obj(*client);
if (client == NULL)
goto fail;
@@ -545,7 +545,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
}
pci_set_master(dev);
- lynx = kzalloc_obj(*lynx, GFP_KERNEL);
+ lynx = kzalloc_obj(*lynx);
if (lynx == NULL) {
dev_err(&dev->dev, "Failed to allocate control structure\n");
ret = -ENOMEM;
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index 89e0873501f5..021b8f698e34 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -966,7 +966,7 @@ static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry)
{
struct sbp2_logical_unit *lu;
- lu = kmalloc_obj(*lu, GFP_KERNEL);
+ lu = kmalloc_obj(*lu);
if (!lu)
return -ENOMEM;