1. 30 5月, 2016 6 次提交
    • J
      kernel-doc/rst: reference functions according to C domain spec · a19bce64
      Jani Nikula 提交于
      The Sphinx C domain spec says function references should include the
      parens ().
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      a19bce64
    • J
      kernel-doc/rst: do not output DOC: section titles for requested ones · 9e72184b
      Jani Nikula 提交于
      If the user requests a specific DOC: section by name, do not output its
      section title. In these cases, the surrounding context already has a
      heading, and the DOC: section title is only used as an identifier and a
      heading for clarity in the source file.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      9e72184b
    • J
      kernel-doc: add names for output selection · b6c3f456
      Jani Nikula 提交于
      Make the output selection a bit more readable by adding constants for
      the various types of output selection. While at it, actually call the
      variable for choosing what to output $output_selection.
      
      No functional changes.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      b6c3f456
    • J
      kernel-doc: add names for states and substates · 48af606a
      Jani Nikula 提交于
      Make the state machine a bit more readable by adding constants for
      parser states and inline member documentation parser substates. While at
      it, rename the "split" documentation to "inline" documentation.
      
      No functional changes.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      48af606a
    • J
      kernel-doc: support printing exported and non-exported symbols · 86ae2e38
      Jani Nikula 提交于
      Currently we use docproc to figure out which symbols are exported, and
      then docproc calls kernel-doc on specific functions, to get
      documentation on exported functions. According to git blame and docproc
      comments, this is due to historical reasons, as functions and their
      corresponding EXPORT_SYMBOL* may have been in different files. However
      for more than ten years the recommendation in CodingStyle has been to
      place the EXPORT_SYMBOL* immediately after the closing function brace
      line.
      
      Additionally, the kernel-doc comments for functions are generally placed
      above the function definition in the .c files (i.e. where the
      EXPORT_SYMBOL* is) rather than above the declaration in the .h
      files. There are some exceptions to this, but AFAICT none of these are
      included in DocBook documentation using the "!E" docproc directive.
      
      Therefore, assuming the EXPORT_SYMBOL* and kernel-doc are with the
      function definition, kernel-doc can extract the exported vs. not
      information by making two passes on the input file. Add support for that
      via the new -export and -internal parameters.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      86ae2e38
    • J
      kernel-doc/rst: fix use of uninitialized value · 5e64fa9c
      Jani Nikula 提交于
      I'm not quite sure why the errors below are happening, but this fixes
      them.
      
      Use of uninitialized value in string ne at ./scripts/kernel-doc line 1819, <IN> line 6494.
      Use of uninitialized value $_[0] in join or string at ./scripts/kernel-doc line 1759, <IN> line 6494.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      5e64fa9c
  2. 14 5月, 2016 3 次提交
  3. 21 11月, 2015 3 次提交
    • C
      kernel-doc: Fix parsing of DECLARE_BITMAP in struct · b22b5a9e
      Conchúr Navid 提交于
      Some documented structures in the kernel use DECLARE_BITMAP to create
      arrays of unsigned longs to store information using the bitmap functions.
      These have to be replaced with a parsable version for kernel-doc.
      
      For example a simple input like
      
          /**
           * struct something - some test
           * @members: active members
           */
          struct something {
          	DECLARE_BITMAP(members, MAX_MEMBERS);
          };
      
      resulted in parsing warnings like
      
          warning: No description found for parameter 'MAX_MEMBERS)'
          warning: Excess struct/union/enum/typedef member 'members' description in 'something'
      Signed-off-by: NConchúr Navid <conchur@web.de>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      b22b5a9e
    • C
      kernel-doc: Strip #ifdef/#endif in enums · 4468e21e
      Conchúr Navid 提交于
      Some enumerations in the kernel headers use #ifdef to reduce their size
      based on the the configuration. These lines have to be stripped to avoid
      parsing problems.
      
      For example a simple input like
      
          /**
           * enum flags - test flags
           * @flag1: first flag
           * @flag2: second flag
           */
          enum flags {
          	flag1 = BIT(0),
          #ifdef SECOND_FLAG
          	flag2 = BIT(1),
          #endif
          };
      
      resulted in parsing warnings like
      
          warning: Enum value '#ifdef SECOND_FLAG;flag2 = BIT(1)' not described in enum 'flags'
          warning: Enum value '#endif;' not described in enum 'flags'
      Signed-off-by: NConchúr Navid <conchur@web.de>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      4468e21e
    • C
      kernel-doc: Fix stripping of #define in enums · 8a9260aa
      Conchúr Navid 提交于
      The regex to strip single line #define's in enumerations depends on the
      fact that the defines are still stored on separate lines. But the
      surrounding code already removed newlines and replaced them with
      semicolons.
      
      For example a simple input like
      
          /**
           * enum flags - test flags
           * @flag1: first flag
           * @flag2: second flag
           * @flag3: third flag
           * @flag4: fourth flag
           */
          enum flags {
          	flag1 = BIT(0),
          	flag2 = BIT(1),
          #define flags_small (flag1 | flag2)
          	flag3 = BIT(2),
          	flag4 = BIT(3),
          #define flags_big (flag2 | flag3)
          };
      
      resulted in parsing warnings like
      
          warning: Enum value '#define flags_small (flag1 | flag2);flag3 = BIT(2)' not described in enum 'flags'
          warning: Enum value '#define flags_big (flag2 | flag3);' not described in enum 'flags'
      Signed-off-by: NConchúr Navid <conchur@web.de>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      8a9260aa
  4. 18 11月, 2015 1 次提交
  5. 12 10月, 2015 1 次提交
  6. 10 10月, 2015 2 次提交
  7. 14 9月, 2015 3 次提交
  8. 05 9月, 2015 1 次提交
  9. 24 8月, 2015 1 次提交
  10. 07 8月, 2015 1 次提交
    • D
      scripts/kernel-doc Allow struct arguments documentation in struct body · a4c6ebed
      Danilo Cesar Lemes de Paula 提交于
      Describing arguments at top of a struct definition works fine
      for small/medium size structs, but it definitely doesn't work well
      for struct with a huge list of elements.
      
      Keeping the arguments list inside the struct body makes it easier
      to maintain the documentation.
      ie:
      /**
       * struct my_struct - short description
       * @a: first member
       * @b: second member
       *
       * Longer description
       */
      struct my_struct {
          int a;
          int b;
          /**
           * @c: This is longer description of C
           *
           * You can use paragraphs to describe arguments
           * using this method.
           */
          int c;
      };
      
      This patch allows the use of this kind of syntax. Only one argument
      per comment and user can use how many paragraphs he needs. It should
      start with /**, which is already being used by kernel-doc. If those
      comment doesn't follow those rules, it will be ignored.
      Signed-off-by: NDanilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Stephan Mueller <smueller@chronox.de>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
      Cc: dri-devel <dri-devel@lists.freedesktop.org>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      a4c6ebed
  11. 11 7月, 2015 2 次提交
  12. 11 12月, 2014 1 次提交
  13. 27 8月, 2014 1 次提交
  14. 13 7月, 2014 1 次提交
  15. 02 12月, 2013 1 次提交
  16. 13 11月, 2013 1 次提交
  17. 07 11月, 2013 1 次提交
  18. 28 2月, 2013 1 次提交
    • N
      scripts/kernel-doc: handle struct member __aligned without numbers · 9dc30918
      Nishanth Menon 提交于
      Commit ef5da59f ("scripts/kernel-doc: handle struct member
      __aligned") permits "char something [123] __aligned(8);".
      
      However, by using \d we constraint ourselves with integers.  This is not
      always the case.  In fact, it might be better to do char something[123]
      __aligned(sizeof(u16));
      
      For example, With wireless_dev defining:
      
          u8 address[ETH_ALEN] __aligned(sizeof(u16));
      
      With \d, scripts/kernel-doc erroneously says:
      
          Warning(include/net/cfg80211.h:2618): Excess struct/union/enum/typedef member 'address' description in 'wireless_dev'
      
      This is because the regex __aligned\s*\(\d+\) fails match at \d as
      sizeof is used.
      
      So replace \d with .  to indicate "something" in kernel-doc to ignore
      __aligned(SOMETHING) in structs.  With this change, we can use integers
      OR sizeof() or macros as we please.
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Johannes Berg <johannes.berg@intel.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9dc30918
  19. 04 1月, 2013 1 次提交
    • G
      misc: remove __dev* attributes. · 6ae14171
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the last of the __dev* markings from the kernel from
      a variety of different, tiny, places.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6ae14171
  20. 06 12月, 2012 1 次提交
  21. 28 11月, 2012 1 次提交
  22. 06 10月, 2012 3 次提交
    • D
      kernel-doc: don't mangle whitespace in Example section · 12ae6779
      Daniel Santos 提交于
      A section with the name "Example" (case-insensitive) has a special meaning
      to kernel-doc.  These sections are output using mono-type fonts.  However,
      leading whitespace is stripped, thus robbing a lot of meaning from this,
      as indented code examples will be mangled.
      
      This patch preserves the leading whitespace for "Example" sections.  More
      accurately, it preserves it for all sections, but removes it later if the
      section isn't an "Example" section.
      Signed-off-by: NDaniel Santos <daniel.santos@pobox.com>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12ae6779
    • D
      kernel-doc: bugfix - empty line in Example section · e314ba31
      Daniel Santos 提交于
      If you have a section named "Example" that contains an empty line,
      attempting to generate htmldocs give you the error:
      
      /path/Documentation/DocBook/kernel-api.xml:3455: parser error : Opening and ending tag mismatch: programlisting line 3449 and para
         </para><para>
                ^
      /path/Documentation/DocBook/kernel-api.xml:3473: parser error : Opening and ending tag mismatch: para line 3467 and programlisting
      </programlisting></informalexample>
                       ^
      /path/Documentation/DocBook/kernel-api.xml:3678: parser error : Opening and ending tag mismatch: programlisting line 3672 and para
         </para><para>
                ^
      /path/Documentation/DocBook/kernel-api.xml:3701: parser error : Opening and ending tag mismatch: para line 3690 and programlisting
      </programlisting></informalexample>
                       ^
      unable to parse
      /path/Documentation/DocBook/kernel-api.xml
      
      Essentially, the script attempts to close a <programlisting> with a
      closing tag for a <para> block.  This patch corrects the problem by
      simply not outputting anything extra when we're dumping pre-formatted
      text, since the empty line will be rendered correctly anyway.
      Signed-off-by: NDaniel Santos <daniel.santos@pobox.com>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e314ba31
    • D
      kernel-doc: bugfix - multi-line macros · 65478428
      Daniel Santos 提交于
      Prior to this patch the following code breaks:
      
      /**
       * multiline_example - this breaks kernel-doc
       */
       #define multiline_example( \
      myparam)
      
      Producing this error:
      
      Error(somefile.h:983): cannot understand prototype: 'multiline_example( \ '
      
      This patch fixes the issue by appending all lines ending in a blackslash
      (optionally followed by whitespace), removing the backslash and any
      whitespace after it prior to appending (just like the C pre-processor
      would).
      
      This fixes a break in kerel-doc introduced by the additions to rbtree.h.
      Signed-off-by: NDaniel Santos <daniel.santos@pobox.com>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      65478428
  23. 31 8月, 2012 1 次提交
  24. 18 8月, 2012 1 次提交
  25. 24 1月, 2012 1 次提交