History

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.

Linus Torvalds committed 8 months ago

Commit bf4afc51 parent e19e1b46673 files · +13013 −13013Browse files

Showing the changes to kernel/fail_function.c (1 of 6673 files). Show all

Unified · Split

kernel/fail_function.c+1−1
@@ -57,7 +57,7 @@ static struct fei_attr *fei_attr_new(const char *sym, unsigned long addr) · 56 unmodified lines
57{57{
58 struct fei_attr *attr;58 struct fei_attr *attr;
59 59
60 attr = kzalloc_obj(*attr, GFP_KERNEL);60 attr = kzalloc_obj(*attr);
61 if (attr) {61 if (attr) {
62 attr->kp.symbol_name = kstrdup(sym, GFP_KERNEL);62 attr->kp.symbol_name = kstrdup(sym, GFP_KERNEL);
63 if (!attr->kp.symbol_name) {63 if (!attr->kp.symbol_name) {