From: Peter Maydell Date: Thu, 14 Aug 2025 17:13:19 +0000 (+0100) Subject: scripts/kernel-doc: strip QEMU_ from function definitions X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f58572cff7e79c7733ba504cd200af2287706f5;p=thirdparty%2Fqemu.git scripts/kernel-doc: strip QEMU_ from function definitions This commit is the Python version of our older commit b30df2751e5 ("scripts/kernel-doc: strip QEMU_ from function definitions"). Some versions of Sphinx get confused if function attributes are left on the C code from kernel-doc; strip out any QEMU_* prefixes from function prototypes. Signed-off-by: Peter Maydell Reviewed-by: Paolo Bonzini Reviewed-by: Mauro Carvalho Chehab Message-id: 20250814171324.1614516-5-peter.maydell@linaro.org --- diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py index fe730099eca..32b43562929 100644 --- a/scripts/lib/kdoc/kdoc_parser.py +++ b/scripts/lib/kdoc/kdoc_parser.py @@ -907,6 +907,7 @@ class KernelDoc: (r"^__always_inline +", "", 0), (r"^noinline +", "", 0), (r"^__FORTIFY_INLINE +", "", 0), + (r"QEMU_[A-Z_]+ +", "", 0), (r"__init +", "", 0), (r"__init_or_module +", "", 0), (r"__deprecated +", "", 0),