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/8021q | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.bz2 linux-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 'net/8021q')
| -rw-r--r-- | net/8021q/vlan_core.c | 4 | ||||
| -rw-r--r-- | net/8021q/vlan_dev.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index d7849667ddf0..d23965e76c16 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c @@ -150,7 +150,7 @@ static struct vlan_info *vlan_info_alloc(struct net_device *dev) { struct vlan_info *vlan_info; - vlan_info = kzalloc_obj(struct vlan_info, GFP_KERNEL); + vlan_info = kzalloc_obj(struct vlan_info); if (!vlan_info) return NULL; @@ -193,7 +193,7 @@ static struct vlan_vid_info *vlan_vid_info_alloc(__be16 proto, u16 vid) { struct vlan_vid_info *vid_info; - vid_info = kzalloc_obj(struct vlan_vid_info, GFP_KERNEL); + vid_info = kzalloc_obj(struct vlan_vid_info); if (!vid_info) return NULL; vid_info->proto = proto; diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 176912c62915..c40f7d5c4fca 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -192,7 +192,7 @@ int vlan_dev_set_egress_priority(const struct net_device *dev, /* Create a new mapping then. */ mp = vlan->egress_priority_map[skb_prio & 0xF]; - np = kmalloc_obj(struct vlan_priority_tci_mapping, GFP_KERNEL); + np = kmalloc_obj(struct vlan_priority_tci_mapping); if (!np) return -ENOBUFS; @@ -708,7 +708,7 @@ static int vlan_dev_netpoll_setup(struct net_device *dev) struct netpoll *netpoll; int err = 0; - netpoll = kzalloc_obj(*netpoll, GFP_KERNEL); + netpoll = kzalloc_obj(*netpoll); err = -ENOMEM; if (!netpoll) goto out; |