summaryrefslogtreecommitdiff
path: root/drivers/md/md.c
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 /drivers/md/md.c
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 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index b7ac2440fbbb..3ce6f9e9d38e 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -853,7 +853,7 @@ static struct mddev *mddev_alloc(dev_t unit)
if (unit && MAJOR(unit) != MD_MAJOR)
unit &= ~((1 << MdpMinorShift) - 1);
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (!new)
return ERR_PTR(-ENOMEM);
@@ -1222,8 +1222,8 @@ static int md_sb_equal(mdp_super_t *sb1, mdp_super_t *sb2)
int ret;
mdp_super_t *tmp1, *tmp2;
- tmp1 = kmalloc_obj(*tmp1, GFP_KERNEL);
- tmp2 = kmalloc_obj(*tmp2, GFP_KERNEL);
+ tmp1 = kmalloc_obj(*tmp1);
+ tmp2 = kmalloc_obj(*tmp2);
if (!tmp1 || !tmp2) {
ret = 0;
@@ -3817,7 +3817,7 @@ static struct md_rdev *md_import_device(dev_t newdev, int super_format, int supe
sector_t size;
int err;
- rdev = kzalloc_obj(*rdev, GFP_KERNEL);
+ rdev = kzalloc_obj(*rdev);
if (!rdev)
return ERR_PTR(-ENOMEM);
@@ -8541,7 +8541,7 @@ struct md_thread *md_register_thread(void (*run) (struct md_thread *),
{
struct md_thread *thread;
- thread = kzalloc_obj(struct md_thread, GFP_KERNEL);
+ thread = kzalloc_obj(struct md_thread);
if (!thread)
return NULL;
@@ -10749,7 +10749,7 @@ void md_autodetect_dev(dev_t dev)
{
struct detected_devices_node *node_detected_dev;
- node_detected_dev = kzalloc_obj(*node_detected_dev, GFP_KERNEL);
+ node_detected_dev = kzalloc_obj(*node_detected_dev);
if (node_detected_dev) {
node_detected_dev->dev = dev;
mutex_lock(&detected_devices_mutex);