Fixes "Compiler Attributes: add __alloc_size() for better bounds checking" so that the __alloc_size() macro is ignored for function prototypes when generating kerndoc. Avoids warnings like: ./include/linux/slab.h:662: warning: Function parameter or member '1' not described in '__alloc_size' ./include/linux/slab.h:662: warning: Function parameter or member '2' not described in '__alloc_size' ./include/linux/slab.h:662: warning: expecting prototype for kcalloc(). Prototype was for __alloc_size() instead
Showing the changes to scripts/kernel-doc (1 of 1 file). Show all
Unified · Split
| @@ -1789,6 +1789,7 @@ sub dump_function($$) { · 1788 unmodified lines | |||
| 1789 | $prototype =~ s/__weak +//; | 1789 | $prototype =~ s/__weak +//; |
| 1790 | $prototype =~ s/__sched +//; | 1790 | $prototype =~ s/__sched +//; |
| 1791 | $prototype =~ s/__printf\s*\(\s*\d*\s*,\s*\d*\s*\) +//; | 1791 | $prototype =~ s/__printf\s*\(\s*\d*\s*,\s*\d*\s*\) +//; |
| 1792 | $prototype =~ s/__alloc_size\s*\(\s*\d+\s*(?:,\s*\d+\s*)?\) +//; | ||
| 1792 | my $define = $prototype =~ s/^#\s*define\s+//; #ak added | 1793 | my $define = $prototype =~ s/^#\s*define\s+//; #ak added |
| 1793 | $prototype =~ s/__attribute_const__ +//; | 1794 | $prototype =~ s/__attribute_const__ +//; |
| 1794 | $prototype =~ s/__attribute__\s*\(\( | 1795 | $prototype =~ s/__attribute__\s*\(\( |