Skip to content
Snippets Groups Projects
  1. May 30, 2016
  2. May 14, 2016
  3. Nov 20, 2015
    • Conchúr Navid's avatar
      kernel-doc: Fix parsing of DECLARE_BITMAP in struct · b22b5a9e
      Conchúr Navid authored
      
      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: default avatarConchúr Navid <conchur@web.de>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      b22b5a9e
    • Conchúr Navid's avatar
      kernel-doc: Strip #ifdef/#endif in enums · 4468e21e
      Conchúr Navid authored
      
      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: default avatarConchúr Navid <conchur@web.de>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      4468e21e
    • Conchúr Navid's avatar
      kernel-doc: Fix stripping of #define in enums · 8a9260aa
      Conchúr Navid authored
      
      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: default avatarConchúr Navid <conchur@web.de>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      8a9260aa
  4. Nov 18, 2015
  5. Oct 11, 2015
  6. Oct 10, 2015
  7. Sep 13, 2015
  8. Sep 04, 2015
  9. Aug 23, 2015
  10. Aug 06, 2015
    • Danilo Cesar Lemes de Paula's avatar
      scripts/kernel-doc Allow struct arguments documentation in struct body · a4c6ebed
      Danilo Cesar Lemes de Paula authored
      
      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: default avatarDanilo 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: default avatarJonathan Corbet <corbet@lwn.net>
      a4c6ebed
  11. Jul 10, 2015
  12. Dec 11, 2014
  13. Aug 26, 2014
  14. Jul 12, 2014
  15. Dec 02, 2013
  16. Nov 13, 2013
  17. Nov 06, 2013
  18. Feb 28, 2013
    • Nishanth Menon's avatar
      scripts/kernel-doc: handle struct member __aligned without numbers · 9dc30918
      Nishanth Menon authored
      
      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: default avatarNishanth 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9dc30918
  19. Jan 03, 2013
    • Greg Kroah-Hartman's avatar
      misc: remove __dev* attributes. · 6ae14171
      Greg Kroah-Hartman authored
      
      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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6ae14171
  20. Dec 06, 2012
  21. Nov 27, 2012
  22. Oct 05, 2012
    • Daniel Santos's avatar
      kernel-doc: don't mangle whitespace in Example section · 12ae6779
      Daniel Santos authored
      
      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: default avatarDaniel Santos <daniel.santos@pobox.com>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      12ae6779
    • Daniel Santos's avatar
      kernel-doc: bugfix - empty line in Example section · e314ba31
      Daniel Santos authored
      
      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: default avatarDaniel Santos <daniel.santos@pobox.com>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e314ba31
    • Daniel Santos's avatar
      kernel-doc: bugfix - multi-line macros · 65478428
      Daniel Santos authored
      
      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: default avatarDaniel Santos <daniel.santos@pobox.com>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      65478428
  23. Aug 31, 2012
Loading