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 /drivers/usb/mon | |
| 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 'drivers/usb/mon')
| -rw-r--r-- | drivers/usb/mon/mon_bin.c | 2 | ||||
| -rw-r--r-- | drivers/usb/mon/mon_main.c | 2 | ||||
| -rw-r--r-- | drivers/usb/mon/mon_stat.c | 2 | ||||
| -rw-r--r-- | drivers/usb/mon/mon_text.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index c0c4eb0a166d..d84749829963 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c @@ -694,7 +694,7 @@ static int mon_bin_open(struct inode *inode, struct file *file) return -ENODEV; } - rp = kzalloc_obj(struct mon_reader_bin, GFP_KERNEL); + rp = kzalloc_obj(struct mon_reader_bin); if (rp == NULL) { rc = -ENOMEM; goto err_alloc; diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c index b3a68ac6fb98..e4fff194fea0 100644 --- a/drivers/usb/mon/mon_main.c +++ b/drivers/usb/mon/mon_main.c @@ -273,7 +273,7 @@ static void mon_bus_init(struct usb_bus *ubus) { struct mon_bus *mbus; - mbus = kzalloc_obj(struct mon_bus, GFP_KERNEL); + mbus = kzalloc_obj(struct mon_bus); if (mbus == NULL) goto err_alloc; kref_init(&mbus->ref); diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c index 8329c1fc719e..3ee2e483da57 100644 --- a/drivers/usb/mon/mon_stat.c +++ b/drivers/usb/mon/mon_stat.c @@ -29,7 +29,7 @@ static int mon_stat_open(struct inode *inode, struct file *file) struct mon_bus *mbus; struct snap *sp; - sp = kmalloc_obj(struct snap, GFP_KERNEL); + sp = kmalloc_obj(struct snap); if (sp == NULL) return -ENOMEM; diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index b55016068b47..4c8e2518e407 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c @@ -330,7 +330,7 @@ static int mon_text_open(struct inode *inode, struct file *file) mutex_lock(&mon_lock); mbus = inode->i_private; - rp = kzalloc_obj(struct mon_reader_text, GFP_KERNEL); + rp = kzalloc_obj(struct mon_reader_text); if (rp == NULL) { rc = -ENOMEM; goto err_alloc; |
