summaryrefslogtreecommitdiff
path: root/net/ethtool
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 /net/ethtool
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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/ethtool')
-rw-r--r--net/ethtool/cmis_cdb.c2
-rw-r--r--net/ethtool/ioctl.c4
-rw-r--r--net/ethtool/module.c2
-rw-r--r--net/ethtool/tsconfig.c6
-rw-r--r--net/ethtool/tsinfo.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/net/ethtool/cmis_cdb.c b/net/ethtool/cmis_cdb.c
index 674439bedd49..3670ca42dd40 100644
--- a/net/ethtool/cmis_cdb.c
+++ b/net/ethtool/cmis_cdb.c
@@ -276,7 +276,7 @@ ethtool_cmis_cdb_init(struct net_device *dev,
struct ethtool_cmis_cdb *cdb;
int err;
- cdb = kzalloc_obj(*cdb, GFP_KERNEL);
+ cdb = kzalloc_obj(*cdb);
if (!cdb)
return ERR_PTR(-ENOMEM);
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index b4e7c6ccf9f3..ff4b4780d6af 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -3040,7 +3040,7 @@ ethtool_set_per_queue_coalesce(struct net_device *dev,
bitmap_from_arr32(queue_mask, per_queue_opt->queue_mask, MAX_NUM_QUEUE);
n_queue = bitmap_weight(queue_mask, MAX_NUM_QUEUE);
- tmp = backup = kmalloc_objs(*backup, n_queue, GFP_KERNEL);
+ tmp = backup = kmalloc_objs(*backup, n_queue);
if (!backup)
return -ENOMEM;
@@ -3554,7 +3554,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *useraddr)
if (copy_from_user(&ethcmd, useraddr, sizeof(ethcmd)))
return -EFAULT;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
diff --git a/net/ethtool/module.c b/net/ethtool/module.c
index d033a20aa48c..0a761bf4771e 100644
--- a/net/ethtool/module.c
+++ b/net/ethtool/module.c
@@ -301,7 +301,7 @@ module_flash_fw_schedule(struct net_device *dev, const char *file_name,
struct ethtool_module_fw_flash *module_fw;
int err;
- module_fw = kzalloc_obj(*module_fw, GFP_KERNEL);
+ module_fw = kzalloc_obj(*module_fw);
if (!module_fw)
return -ENOMEM;
diff --git a/net/ethtool/tsconfig.c b/net/ethtool/tsconfig.c
index acd0477b3a2d..e49e612a68c2 100644
--- a/net/ethtool/tsconfig.c
+++ b/net/ethtool/tsconfig.c
@@ -202,10 +202,10 @@ static int tsconfig_send_reply(struct net_device *dev, struct genl_info *info)
int reply_len = 0;
int ret;
- req_info = kzalloc_obj(*req_info, GFP_KERNEL);
+ req_info = kzalloc_obj(*req_info);
if (!req_info)
return -ENOMEM;
- reply_data = kmalloc_obj(*reply_data, GFP_KERNEL);
+ reply_data = kmalloc_obj(*reply_data);
if (!reply_data) {
kfree(req_info);
return -ENOMEM;
@@ -280,7 +280,7 @@ tsconfig_set_hwprov_from_desc(struct net_device *dev,
source = HWTSTAMP_SOURCE_PHYLIB;
}
- hwprov = kzalloc_obj(*hwprov, GFP_KERNEL);
+ hwprov = kzalloc_obj(*hwprov);
if (!hwprov)
return ERR_PTR(-ENOMEM);
diff --git a/net/ethtool/tsinfo.c b/net/ethtool/tsinfo.c
index df9c7de9a640..c0145c752d2f 100644
--- a/net/ethtool/tsinfo.c
+++ b/net/ethtool/tsinfo.c
@@ -505,10 +505,10 @@ int ethnl_tsinfo_start(struct netlink_callback *cb)
BUILD_BUG_ON(sizeof(*ctx) > sizeof(cb->ctx));
- req_info = kzalloc_obj(*req_info, GFP_KERNEL);
+ req_info = kzalloc_obj(*req_info);
if (!req_info)
return -ENOMEM;
- reply_data = kzalloc_obj(*reply_data, GFP_KERNEL);
+ reply_data = kzalloc_obj(*reply_data);
if (!reply_data) {
ret = -ENOMEM;
goto free_req_info;