1. 10 6月, 2016 7 次提交
  2. 04 6月, 2016 1 次提交
    • D
      scripts/kernel-doc: Add option to inject line numbers · 0b0f5f29
      Daniel Vetter 提交于
      Opt-in since this wreaks the rst output and must be removed
      by consumers again. This is useful to adjust the linenumbers
      for included kernel-doc snippets in shinx. With that sphinx
      error message will be accurate when there's issues with the
      rst-ness of the kernel-doc comments.
      
      Especially when transitioning a new docbook .tmpl to .rst this
      is extremely useful, since you can just use your editors compilation
      quickfix list to accurately jump from error to error.
      
      v2:
      - Also make sure that we filter the LINENO for purpose/at declaration
        start so it only shows for selected blocks, not all of them (Jani).
        While at it make it a notch more accurate.
      - Avoid undefined $lineno issues. I tried filtering these out at the
        callsite, but Jani spotted more when linting the entire kernel.
        Unamed unions and similar things aren't stored consistently and end
        up with an undefined line number (but also no kernel-doc text, just
        the parameter type). Simplify things and filter undefined line
        numbers in print_lineno() to catch them all.
      
      v3: Fix LINENO 0 issue for kernel-doc comments without @param: lines
      or any other special sections that directly jump to the description
      after the "name - purpose" line. Only really possible for functions
      without parameters. Noticed by Jani.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: linux-doc@vger.kernel.org
      Cc: Jonathan Corbet <corbet@lwn.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      0b0f5f29
  3. 03 6月, 2016 2 次提交
  4. 30 5月, 2016 23 次提交
  5. 14 5月, 2016 3 次提交
  6. 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
  7. 18 11月, 2015 1 次提交