From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Kees Cook <kees@kernel.org>
Cc: linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-hardening@vger.kernel.org, linux-doc@vger.kernel.org
Subject: [PATCH][next] stddef: Fix kernel-doc/Sphinx warnings for __TRAILING_OVERLAP()
Date: Tue, 12 May 2026 13:34:44 -0600 [thread overview]
Message-ID: <agOA1PDX2h3PNhl2@kspp> (raw)
Fix the following kdoc warnings:
Documentation/driver-api/basics:127: ./include/linux/stddef.h:110: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils]
Documentation/driver-api/basics:127: ./include/linux/stddef.h:115: ERROR: Unexpected indentation. [docutils]
Documentation/driver-api/basics:127: ./include/linux/stddef.h:116: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/driver-api/basics:127: ./include/linux/stddef.h:117: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils]
Documentation/driver-api/basics:127: ./include/linux/stddef.h:122: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils]
Documentation/driver-api/basics:127: ./include/linux/stddef.h:124: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils]
Documentation/driver-api/basics:127: ./include/linux/stddef.h:139: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils]
Documentation/driver-api/basics:127: ./include/linux/stddef.h:140: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils]
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605120507.9iQRMgKR-lkp@intel.com/
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
include/linux/stddef.h | 48 +++++++++++++++++++++---------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index 665d7a68cd98..f666ced2a9e7 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -104,26 +104,26 @@ enum {
* union, designated initializers for MEMBERS may overwrite portions
* previously initialized through NAME.
*
- * For example:
- *
- * struct flex {
- * size_t count;
- * u8 fam[];
- * };
- *
- * struct composite {
- * ...
- * __TRAILING_OVERLAP(struct flex, flex, fam, __packed,
- * u8 data;
- * );
- * } __packed;
- *
- * static struct composite comp = {
- * .flex = {
- * .count = 1,
- * },
- * .data = 2,
- * };
+ * For example::
+ *
+ * struct flex {
+ * size_t count;
+ * u8 fam[];
+ * };
+ *
+ * struct composite {
+ * ...
+ * __TRAILING_OVERLAP(struct flex, flex, fam, __packed,
+ * u8 data;
+ * );
+ * } __packed;
+ *
+ * static struct composite comp = {
+ * .flex = {
+ * .count = 1,
+ * },
+ * .data = 2,
+ * };
*
* In the example above, .flex and .data initialize different views of the same
* union storage. Since .data is initialized last, it _may_ overwrite portions
@@ -133,7 +133,7 @@ enum {
* A couple of alternatives are shown below.
*
* a) Initialize only one view of the overlapped storage and assign the rest
- * at runtime:
+ * at runtime::
*
* static struct composite comp = {
* .flex = {
@@ -147,9 +147,7 @@ enum {
* ...
* }
*
- * (Compiler Explorer test code: https://godbolt.org/z/zz4K1Ejvf)
- *
- * b) Alternatively, replace designated initializers with runtime assignments.
+ * b) Alternatively, replace designated initializers with runtime assignments::
*
* static void foo(void)
* {
@@ -160,6 +158,8 @@ enum {
* ...
* }
*
+ * Compiler Explorer test code: https://godbolt.org/z/zz4K1Ejvf
+ *
* For another example of the above see commit 5e54510a9389 ("acpi: nfit:
* intel: avoid multiple -Wflex-array-member-not-at-end warnings")
*
--
2.51.0
next reply other threads:[~2026-05-12 19:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 19:34 Gustavo A. R. Silva [this message]
2026-05-13 4:47 ` [PATCH][next] stddef: Fix kernel-doc/Sphinx warnings for __TRAILING_OVERLAP() Kees Cook
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=agOA1PDX2h3PNhl2@kspp \
--to=gustavoars@kernel.org \
--cc=kees@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hardening@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