Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kernel-doc: Fix symbol matching for dropped suffixes

The support for dropping "_noprof" missed dropping the suffix from
exported symbols. That meant that using the :export: feature would
look for kernel-doc for (eg) krealloc_noprof() and not find the
kernel-doc for krealloc().

Fixes: 51a7bf0238c2 (scripts/kernel-doc: drop "_noprof" on function prototypes)
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250606141543.1285671-1-willy@infradead.org

authored by

Matthew Wilcox (Oracle) and committed by
Jonathan Corbet
27ad33b6 97d91036

+8
+8
scripts/lib/kdoc/kdoc_parser.py
··· 1171 1171 with a staticmethod decorator. 1172 1172 """ 1173 1173 1174 + # We support documenting some exported symbols with different 1175 + # names. A horrible hack. 1176 + suffixes = [ '_noprof' ] 1177 + 1174 1178 # Note: it accepts only one EXPORT_SYMBOL* per line, as having 1175 1179 # multiple export lines would violate Kernel coding style. 1176 1180 1177 1181 if export_symbol.search(line): 1178 1182 symbol = export_symbol.group(2) 1183 + for suffix in suffixes: 1184 + symbol = symbol.removesuffix(suffix) 1179 1185 function_set.add(symbol) 1180 1186 return 1181 1187 1182 1188 if export_symbol_ns.search(line): 1183 1189 symbol = export_symbol_ns.group(2) 1190 + for suffix in suffixes: 1191 + symbol = symbol.removesuffix(suffix) 1184 1192 function_set.add(symbol) 1185 1193 1186 1194 def process_normal(self, ln, line):