Skip to content
  1. Jun 10, 2016
  2. Jun 04, 2016
    • Daniel Vetter's avatar
      doc/sphinx: Track line-number of starting blocks · d90368f2
      Daniel Vetter authored
      
      
      Design is pretty simple: kernel-doc inserts breadcrumbs with line
      numbers, and sphinx picks them up. At first I went with a sphinx
      comment, but inserting those at random places seriously upsets the
      parser, and must be filtered. Hence why this version now uses "#define
      LINEO " since one of these ever escape into output it's pretty clear
      there is a bug.
      
      It seems to work well, and at least the 2-3 errors where sphinx
      complained about something that was not correct in kernel-doc text the
      line numbers matched up perfectly.
      
      v2: Instead of noodling around in the parser state machine, create
      a ViewList and parse it ourselves. This seems to be the recommended
      way, per Jani's suggestion.
      
      v3:
      - Split out ViewList pach. Splitting the kernel-doc changes from the
        sphinx ones isn't possible, since emitting the LINENO lines wreaks
        havoc with the rst formatting. We must filter them.
      
      - Improve the regex per Jani's suggestions, and compile it just once
        for speed.
      
      - Now that LINENO lines are eaten, also add them to function parameter
        descriptions. Much less content and offset than for in-line struct
        member descriptions, but still nice to know which exact continuation
        line upsets sphinx.
      
      - Simplify/clarify the line +/-1 business a bit.
      
      v4: Split out the scripts/kernel-doc changes and make line-numbers
      opt-in, as suggested by Jani.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: linux-doc@vger.kernel.org
      Cc: Jonathan Corbet <corbet@lwn.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      d90368f2
    • Daniel Vetter's avatar
      scripts/kernel-doc: Add option to inject line numbers · 0b0f5f29
      Daniel Vetter authored
      
      
      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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      0b0f5f29
    • Niklas Söderlund's avatar
    • Andy Deng's avatar
      Documentation/zh_CN: update Chinese version CodingStyle · 49e48419
      Andy Deng authored
      
      
      Chinese version CodingStyle is a little outdate, it should be updated.
      
      This patch sync with the latest CodingStyle of all changes,
      new chapters (chapter 19 and chapter 20) have been translated.
      
      Signed-off-by: default avatarAndy Deng <theandy.deng@gmail.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      49e48419
    • Brian Norris's avatar
      doc: clarify that trace_events= takes a comma-separated list · d81749ea
      Brian Norris authored
      
      
      It took me browsing through the source code to determine that I was,
      indeed, using the wrong delimiter in my command lines. So I might as
      well document it for the next person.
      
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      d81749ea
    • Mike Danese's avatar
      mpssd: fix buffer overflow warning · 3610a2ad
      Mike Danese authored
      The compilation emits a warning in function ‘snprintf’,
          inlined from ‘set_cmdline’ at
          ../Documentation/mic/mpssd/mpssd.c:1541:9:
      /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10:
          warning: call to __builtin___snprintf_chk will always overflow
          destination buffer
      
      This was introduced in commit f4a66c20
      
       ("misc: mic: Update MIC host
      daemon with COSM changes") and is fixed by reverting the changes to the
      size argument of these snprintf statements.
      
      Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
      Signed-off-by: default avatarMike Danese <mikedanese@google.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      3610a2ad
    • Javier Martinez Canillas's avatar
      Documentation: Fix some grammar mistakes in sync_file.txt · fac8434d
      Javier Martinez Canillas authored
      
      
      There are two sentences in the Sync File documentation where the
      english is a little off. This patch is an attempt to fix these.
      
      Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
      Reviewed-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      fac8434d
  3. Jun 03, 2016
  4. Jun 01, 2016
  5. May 30, 2016