linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Seo <james@equiv.tech>
To: Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: James Seo <james@equiv.tech>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] Documentation: conf.py: Add __force to c_id_attributes
Date: Tue,  9 May 2023 10:55:43 -0700	[thread overview]
Message-ID: <20230509175543.2065835-2-james@equiv.tech> (raw)
In-Reply-To: <20230509175543.2065835-1-james@equiv.tech>

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>
---
 Documentation/conf.py | 1 +
 1 file changed, 1 insertion(+)

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",
-- 
2.34.1


  reply	other threads:[~2023-05-09 17:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 17:55 [PATCH 0/3] Generate documentation for error pointer functions James Seo
2023-05-09 17:55 ` James Seo [this message]
2023-05-09 17:55 ` [PATCH 2/3] err.h: Add missing kerneldocs " James Seo
2023-05-09 17:55 ` [PATCH 3/3] Documentation: core-api: Add error pointer functions to kernel-api James Seo
2023-05-19 15:13 ` [PATCH 0/3] Generate documentation for error pointer functions Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230509175543.2065835-2-james@equiv.tech \
    --to=james@equiv.tech \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).