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.
Showing the changes to kernel/livepatch/patch.c (1 of 6673 files). Show all
Unified · Split
| @@ -179,7 +179,7 @@ static int klp_patch_func(struct klp_func *func) · 178 unmodified lines | ||
| 179 | 179 | return -EINVAL; |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | − ops = kzalloc_obj(*ops, GFP_KERNEL); | |
| 182 | + ops = kzalloc_obj(*ops); | |
| 183 | 183 | if (!ops) |
| 184 | 184 | return -ENOMEM; |
| 185 | 185 | |