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/net/pse-pd | |
| 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/net/pse-pd')
| -rw-r--r-- | drivers/net/pse-pd/pd692x0.c | 2 | ||||
| -rw-r--r-- | drivers/net/pse-pd/pse_core.c | 4 | ||||
| -rw-r--r-- | drivers/net/pse-pd/tps23881.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c index ef130eb75212..e923da5c5506 100644 --- a/drivers/net/pse-pd/pd692x0.c +++ b/drivers/net/pse-pd/pd692x0.c @@ -1259,7 +1259,7 @@ static int pd692x0_setup_pi_matrix(struct pse_controller_dev *pcdev) struct pd692x0_manager *manager; int ret; - manager = kzalloc_objs(*manager, PD692X0_MAX_MANAGERS, GFP_KERNEL); + manager = kzalloc_objs(*manager, PD692X0_MAX_MANAGERS); if (!manager) return -ENOMEM; diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c index ccbcda0cc4a2..3beaaaeec9e1 100644 --- a/drivers/net/pse-pd/pse_core.c +++ b/drivers/net/pse-pd/pse_core.c @@ -162,7 +162,7 @@ static int of_load_pse_pis(struct pse_controller_dev *pcdev) if (!np) return -ENODEV; - pcdev->pi = kzalloc_objs(*pcdev->pi, pcdev->nr_lines, GFP_KERNEL); + pcdev->pi = kzalloc_objs(*pcdev->pi, pcdev->nr_lines); if (!pcdev->pi) return -ENOMEM; @@ -1408,7 +1408,7 @@ pse_control_get_internal(struct pse_controller_dev *pcdev, unsigned int index, } } - psec = kzalloc_obj(*psec, GFP_KERNEL); + psec = kzalloc_obj(*psec); if (!psec) return ERR_PTR(-ENOMEM); diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c index 465b6cfa6253..d40cb35a2547 100644 --- a/drivers/net/pse-pd/tps23881.c +++ b/drivers/net/pse-pd/tps23881.c @@ -523,7 +523,7 @@ tps23881_pi_get_pw_limit_ranges(struct pse_controller_dev *pcdev, int id, { struct ethtool_c33_pse_pw_limit_range *c33_pw_limit_ranges; - c33_pw_limit_ranges = kzalloc_obj(*c33_pw_limit_ranges, GFP_KERNEL); + c33_pw_limit_ranges = kzalloc_obj(*c33_pw_limit_ranges); if (!c33_pw_limit_ranges) return -ENOMEM; |
