1. 22 12月, 2017 3 次提交
  2. 12 12月, 2017 1 次提交
    • M
      kernel-doc: parse DECLARE_KFIFO and DECLARE_KFIFO_PTR() · 45005b27
      Mauro Carvalho Chehab 提交于
      On media, we now have an struct declared with:
      
      struct lirc_fh {
              struct list_head list;
              struct rc_dev *rc;
              int                             carrier_low;
              bool                            send_timeout_reports;
              DECLARE_KFIFO_PTR(rawir, unsigned int);
              DECLARE_KFIFO_PTR(scancodes, struct lirc_scancode);
              wait_queue_head_t               wait_poll;
              u8                              send_mode;
              u8                              rec_mode;
      };
      
      gpiolib.c has a similar declaration with DECLARE_KFIFO().
      
      Currently, those produce the following error:
      
      	./include/media/rc-core.h:96: warning: No description found for parameter 'int'
      	./include/media/rc-core.h:96: warning: No description found for parameter 'lirc_scancode'
      	./include/media/rc-core.h:96: warning: Excess struct member 'rawir' description in 'lirc_fh'
      	./include/media/rc-core.h:96: warning: Excess struct member 'scancodes' description in 'lirc_fh'
      	../drivers/gpio/gpiolib.c:601: warning: No description found for parameter '16'
      	../drivers/gpio/gpiolib.c:601: warning: Excess struct member 'events' description in 'lineevent_state'
      
      So, teach kernel-doc how to parse DECLARE_KFIFO() and DECLARE_KFIFO_PTR().
      
      While here, relax at the past DECLARE_foo() macros, accepting a random
      number of spaces after comma.
      
      The addition of DECLARE_KFIFO() was
      Suggested-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      Tested-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      45005b27
  3. 02 12月, 2017 1 次提交
    • W
      scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none · e814bccb
      Will Deacon 提交于
      My bisect scripts starting running into build failures when trying to
      compile 4.15-rc1 with the builds failing with things like:
      
      drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2078: error: Cannot parse struct or union!
      
      The line in question is actually just a #define, but after some digging
      it turns out that my scripts pass W=1 and since commit 3a025e1d
      ("Add optional check for bad kernel-doc comments") that results in
      kernel-doc running on each source file. The file in question has a
      badly formatted comment immediately before the #define:
      
      /**
       * struct brcmf_skbuff_cb reserves first two bytes in sk_buff::cb for
       * bus layer usage.
       */
      
      which causes the regex in dump_struct to fail (lack of braces following
      struct declaration) and kernel-doc returns 1, which causes the build
      to fail.
      
      Fix the issue by always returning 0 from kernel-doc when invoked with
      -none. It successfully generates no documentation, and prints out any
      issues.
      
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      e814bccb
  4. 21 11月, 2017 1 次提交
    • M
      Add optional check for bad kernel-doc comments · 3a025e1d
      Matthew Wilcox 提交于
      Implement a '-none' output mode for kernel-doc which will only output
      warning messages, and suppresses the warning message about there being
      no kernel-doc in the file.
      
      If the build has requested additional warnings, automatically check all
      .c files.  This patch does not check .h files.  Enabling the warning
      by default would add about 1300 warnings, so it's default off for now.
      People who care can use this to check they didn't break the docs and
      maybe we'll get all the warnings fixed and be able to enable this check
      by default in the future.
      Signed-off-by: NMatthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      3a025e1d
  5. 16 11月, 2017 1 次提交
  6. 27 9月, 2017 1 次提交
  7. 31 8月, 2017 1 次提交
  8. 03 7月, 2017 1 次提交
  9. 14 5月, 2017 1 次提交
    • K
      scripts: Switch to more portable Perl shebang · cb77f0d6
      Kamil Rytarowski 提交于
      The default NetBSD package manager is pkgsrc and it installs Perl
      along other third party programs under custom and configurable prefix.
      The default prefix for binary prebuilt packages is /usr/pkg, and the
      Perl executable lands in /usr/pkg/bin/perl.
      
      This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
      the most portable solution that should work for almost everybody.
      Perl's executable is detected automatically.
      
      This change switches -w option passed to the executable with more
      modern "use warnings;" approach. There is no functional change to the
      default behavior.
      
      While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).
      Signed-off-by: NKamil Rytarowski <n54@gmx.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      cb77f0d6
  10. 03 4月, 2017 2 次提交
  11. 27 1月, 2017 1 次提交
  12. 14 1月, 2017 1 次提交
  13. 05 1月, 2017 5 次提交
  14. 17 11月, 2016 1 次提交
    • J
      kernel-doc: add support for one line inline struct member doc comments · 0c9aa209
      Jani Nikula 提交于
      kernel-doc supports documenting struct members "inline" since
      a4c6ebed ("scripts/kernel-doc Allow struct arguments documentation
      in struct body"). This requires the inline kernel-doc comments to have
      the opening and closing comment markers (/** and */ respectively) on
      lines of their own, even for short comments. For example:
      
      	/**
      	 * struct foo - struct documentation
      	 */
      	struct foo {
      		/**
      		 * @bar: member documentation
      		 */
      		int bar;
      	};
      
      Add support for one line inline comments:
      
      	/**
      	 * struct foo - struct documentation
      	 */
      	struct foo {
      		/** @bar: member documentation */
      		int bar;
      	};
      
      Note that mixing of the two in one doc comment is not allowed; either
      both comment markers must be on lines of their own, or both must be on
      the one line. This limitation keeps both the comments more uniform, and
      kernel-doc less complicated.
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      0c9aa209
  15. 29 10月, 2016 1 次提交
  16. 06 9月, 2016 2 次提交
  17. 01 9月, 2016 2 次提交
    • M
      docs-rst: kernel-doc: fix typedef output in RST format · 82801d06
      Mauro Carvalho Chehab 提交于
      When using a typedef function like this one:
      	typedef bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);
      
      The Sphinx C domain expects it to create a c:type: reference,
      as that's the way it creates the type references when parsing
      a c:function:: declaration.
      
      So, a declaration like:
      
      	.. c:function:: bool v4l2_valid_dv_timings (const struct v4l2_dv_timings * t, const struct v4l2_dv_timings_cap * cap, v4l2_check_dv_timings_fnc fnc, void * fnc_handle)
      
      Will create a cross reference for :c:type:`v4l2_check_dv_timings_fnc`.
      
      So, when outputting such typedefs in RST format, we need to handle
      this special case, as otherwise it will produce those warnings:
      
      	./include/media/v4l2-dv-timings.h:43: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      	./include/media/v4l2-dv-timings.h:60: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      	./include/media/v4l2-dv-timings.h:81: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      
      So, change the kernel-doc script to produce a RST output for the
      above typedef as:
      	.. c:type:: v4l2_check_dv_timings_fnc
      
      	   **Typedef**: timings check callback
      
      	**Syntax**
      
      	  ``bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);``
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      82801d06
    • M
      docs-rst: improve typedef parser · d37c43ce
      Mauro Carvalho Chehab 提交于
      Improve the parser to handle typedefs like:
      
      	typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle);
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      d37c43ce
  18. 25 8月, 2016 1 次提交
    • M
      docs-rst: kernel-doc: better output struct members · 6d232c80
      Mauro Carvalho Chehab 提交于
      Right now, for a struct, kernel-doc produces the following output:
      
      	.. c:type:: struct v4l2_prio_state
      
      	   stores the priority states
      
      	**Definition**
      
      	::
      
      	  struct v4l2_prio_state {
      	    atomic_t prios[4];
      	  };
      
      	**Members**
      
      	``atomic_t prios[4]``
      	  array with elements to store the array priorities
      
      Putting a member name in verbatim and adding a continuation line
      causes the LaTeX output to generate something like:
      	item[atomic_t prios\[4\]] array with elements to store the array priorities
      
      Everything inside "item" is non-breakable, with may produce
      lines bigger than the column width.
      
      Also, for function members, like:
      
              int (* rx_read) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num);
      
      It puts the name of the member at the end, like:
      
              int (*) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num) read
      
      With is very confusing.
      
      The best is to highlight what really matters: the member name.
      is a secondary information.
      
      So, change kernel-doc, for it to produce the output on a different way:
      
      	**Members**
      
      	``prios[4]``
      
      	  array with elements to store the array priorities
      
      Also, as the type is not part of LaTeX "item[]", LaTeX will split it into
      multiple lines, if needed.
      
      So, both LaTeX/PDF and HTML outputs will look good.
      
      It should be noticed, however, that the way Sphinx LaTeX output handles
      things like:
      
      	Foo
      	   bar
      
      is different than the HTML output. On HTML, it will produce something
      like:
      
      	**Foo**
      	   bar
      
      While, on LaTeX, it puts both foo and bar at the same line, like:
      
      	**Foo** bar
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      6d232c80
  19. 23 8月, 2016 1 次提交
  20. 23 7月, 2016 2 次提交
    • M
      doc-rst: kernel-doc: fix a change introduced by mistake · a3f57ad0
      Mauro Carvalho Chehab 提交于
      changeset b7e67f6c ("doc-rst: linux_tv: supress lots of warnings")
      were meant to touch only on media files, but it also touched
      at this script by mistake. Revert such change.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      a3f57ad0
    • M
      doc-rst: kernel-doc: fix handling of address_space tags · a88b1672
      Mauro Carvalho Chehab 提交于
      The RST cpp:function handler is very pedantic: it doesn't allow any
      macros like __user on it:
      
      	Documentation/media/kapi/dtv-core.rst:28: WARNING: Error when parsing function declaration.
      	If the function has no return type:
      	  Error in declarator or parameters and qualifiers
      	  Invalid definition: Expecting "(" in parameters_and_qualifiers. [error at 8]
      	    ssize_t dvb_ringbuffer_pkt_read_user (struct dvb_ringbuffer * rbuf, size_t idx, int offset, u8 __user * buf, size_t len)
      	    --------^
      	If the function has a return type:
      	  Error in declarator or parameters and qualifiers
      	  If pointer to member declarator:
      	    Invalid definition: Expected '::' in pointer to member (function). [error at 37]
      	      ssize_t dvb_ringbuffer_pkt_read_user (struct dvb_ringbuffer * rbuf, size_t idx, int offset, u8 __user * buf, size_t len)
      	      -------------------------------------^
      	  If declarator-id:
      	    Invalid definition: Expecting "," or ")" in parameters_and_qualifiers, got "*". [error at 102]
      	      ssize_t dvb_ringbuffer_pkt_read_user (struct dvb_ringbuffer * rbuf, size_t idx, int offset, u8 __user * buf, size_t len)
      	      ------------------------------------------------------------------------------------------------------^
      
      So, we have to remove it from the function prototype.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      a88b1672
  21. 18 7月, 2016 1 次提交
  22. 04 7月, 2016 1 次提交
  23. 03 7月, 2016 1 次提交
    • M
      doc-rst: linux_tv: supress lots of warnings · b7e67f6c
      Mauro Carvalho Chehab 提交于
      The c language parser checks if there are duplicated object
      definitions. That causes lots of warnings like:
      	WARNING: duplicate C object description of ioctl
      
      Let's remove those by telling Sphinx that the language for
      those objects are c++. The look of the descriptions will
      be close, and the warnings will be gone.
      
      Please notice that we had to keep a few of them as C, as
      the c++ parser seems to be broken when it finds an enum.
      
      Yet, this reduced from 219 warnings to 143, with is
      a good thing.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      b7e67f6c
  24. 10 6月, 2016 7 次提交