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 /net/rfkill | |
| 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 'net/rfkill')
| -rw-r--r-- | net/rfkill/core.c | 6 | ||||
| -rw-r--r-- | net/rfkill/input.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 0f64aa4797f7..2444237bc36a 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -279,7 +279,7 @@ static void rfkill_send_events(struct rfkill *rfkill, enum rfkill_operation op) struct rfkill_int_event *ev; list_for_each_entry(data, &rfkill_fds, list) { - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) continue; rfkill_fill_event(&ev->ev, rfkill, op); @@ -1165,7 +1165,7 @@ static int rfkill_fop_open(struct inode *inode, struct file *file) struct rfkill *rfkill; struct rfkill_int_event *ev, *tmp; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; @@ -1182,7 +1182,7 @@ static int rfkill_fop_open(struct inode *inode, struct file *file) */ list_for_each_entry(rfkill, &rfkill_list, node) { - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) goto free; rfkill_sync(rfkill); diff --git a/net/rfkill/input.c b/net/rfkill/input.c index 2be6d13ba6ba..f7cb24ce7754 100644 --- a/net/rfkill/input.c +++ b/net/rfkill/input.c @@ -221,7 +221,7 @@ static int rfkill_connect(struct input_handler *handler, struct input_dev *dev, struct input_handle *handle; int error; - handle = kzalloc_obj(struct input_handle, GFP_KERNEL); + handle = kzalloc_obj(struct input_handle); if (!handle) return -ENOMEM; |
