[U-Boot] [PATCH] kernel-doc: Fix broken kernel-doc in linker_lists.h

Robert P. J. Day rpjday at crashcourse.ca
Sun May 22 14:28:45 CEST 2016


Repair two types of erroneous kernel-doc content in this header file
that prevents it from being processed.

  * Remove "/**" comment style from non-kernel-doc content.
  * Remove colons, which in kernel-doc define a new section.

Signed-off-by: Robert P. J. Day <rpjday at crashcourse.ca>

---

  i'll have more to say about kernel-doc shortly, but the more subtle
error in that header file is that the use of colons in lines like

  Example:

are a signal to kernel-doc to start a new section, so avoid colons.

diff --git a/include/linker_lists.h b/include/linker_lists.h
index 76898ab..6182804 100644
--- a/include/linker_lists.h
+++ b/include/linker_lists.h
@@ -21,7 +21,7 @@

 #if !defined(__ASSEMBLY__)

-/**
+/*
  * A linker list is constructed by grouping together linker input
  * sections, each containing one entry of the list. Each input section
  * contains a constant initialized variable which holds the entry's
@@ -141,7 +141,7 @@
  *    elements, then when traversing the outer section, even the elements of
  *    the inner sections are present in the array.
  *
- * Example:
+ * Example
  * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub) = {
  *         .x = 3,
  *         .y = 4,
@@ -173,7 +173,7 @@
 			__attribute__((unused,				\
 			section(".u_boot_list_2_"#_list"_2_"#_name)))

-/**
+/*
  * We need a 0-byte-size type for iterator symbols, and the compiler
  * does not allow defining objects of C type 'void'. Using an empty
  * struct is allowed by the compiler, but causes gcc versions 4.4 and
@@ -194,7 +194,7 @@
  * Since this macro defines an array start symbol, its leftmost index
  * must be 2 and its rightmost index must be 1.
  *
- * Example:
+ * Example
  * struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub);
  */
 #define ll_entry_start(_type, _list)					\
@@ -217,7 +217,7 @@
  * Since this macro defines an array end symbol, its leftmost index
  * must be 2 and its rightmost index must be 3.
  *
- * Example:
+ * Example
  * struct my_sub_cmd *msc = ll_entry_end(struct my_sub_cmd, cmd_sub);
  */
 #define ll_entry_end(_type, _list)					\
@@ -235,7 +235,7 @@
  * placed into subsection of .u_boot_list section specified by _list
  * argument. The result is of an unsigned int type.
  *
- * Example:
+ * Example
  * int i;
  * const unsigned int count = ll_entry_count(struct my_sub_cmd, cmd_sub);
  * struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub);
@@ -260,7 +260,7 @@
  * array identified by the subsection of u_boot_list where the entry resides
  * and it's name.
  *
- * Example:
+ * Example
  * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub) = {
  *         .x = 3,
  *         .y = 4,
@@ -286,7 +286,7 @@
  * Since this macro defines the start of the linker-generated arrays,
  * its leftmost index must be 1.
  *
- * Example:
+ * Example
  * struct my_sub_cmd *msc = ll_start(struct my_sub_cmd);
  */
 #define ll_start(_type)							\
@@ -306,7 +306,7 @@
  * Since this macro defines the end of the linker-generated arrays,
  * its leftmost index must be 3.
  *
- * Example:
+ * Example
  * struct my_sub_cmd *msc = ll_end(struct my_sub_cmd);
  */
 #define ll_end(_type)							\

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the U-Boot mailing list