stddef: Fix kernel-doc/Sphinx warnings for __TRAILING_OVERLAP()
PATCH 1/1 stddef: Fix kernel-doc/Sphinx warnings for __TRAILING_OVERLAP()
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]
--- include/linux/stddef.h | 48 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 24 deletions(-)
include/linux/stddef.h +24 -24
@@ -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") *
Signature · 1 line
2.51.0
Quoted 1 line · Gustavo A. R. Silva
Fix the following kdoc warnings:
Thanks! I've squashed this into the original commit now.
Signature · 1 line
Kees Cook