diff options
author | James Seo <james@equiv.tech> | 2023-05-09 20:55:43 +0300 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2023-05-19 17:58:10 +0300 |
commit | 34d9f62e04568451682a76f1016dbb3e3b3e9bc0 (patch) | |
tree | af33462a7a8cabb1919a0308110fb4a660051072 | |
parent | f41dd67da6460588f541edee6c2344743c8e3bdc (diff) | |
download | linux-34d9f62e04568451682a76f1016dbb3e3b3e9bc0.tar.xz |
Documentation: conf.py: Add __force to c_id_attributes
Fixes the following error in the docs build that occurs with recent
versions of Sphinx when parsing kerneldocs for a function with the
'__force' macro in its signature:
./include/linux/err.h:51: WARNING: Error in declarator or parameters
Error in declarator or parameters
Invalid C declaration: Expected identifier, got keyword: void [error at 35]
void * ERR_CAST (__force const void *ptr)
-----------------------------------^
Currently, almost all of the few in-signature occurrences of '__force'
are in the error pointer functions. Of those, ERR_CAST() is the only
one with kerneldocs, but the kerneldocs aren't even being used to
generate documentation. This change will allow all the error pointer
functions to be properly documented.
In addition to '__force', <linux/compiler_types.h> also defines
'__nocast', '__safe', and '__private'. These are not currently used in
any function signatures and do not need to be added to the docs config.
Signed-off-by: James Seo <james@equiv.tech>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20230509175543.2065835-2-james@equiv.tech
-rw-r--r-- | Documentation/conf.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py index 37314afd1ac8..d4fdf6a3875a 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -74,6 +74,7 @@ if major >= 3: "__percpu", "__rcu", "__user", + "__force", # include/linux/compiler_attributes.h: "__alias", |