1. 01 9月, 2016 1 次提交
  2. 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
  3. 23 8月, 2016 1 次提交
  4. 03 8月, 2016 10 次提交
  5. 28 7月, 2016 1 次提交
    • L
      Disable "maybe-uninitialized" warning globally · 6e8d666e
      Linus Torvalds 提交于
      Several build configurations had already disabled this warning because
      it generates a lot of false positives.  But some had not, and it was
      still enabled for "allmodconfig" builds, for example.
      
      Looking at the warnings produced, every single one I looked at was a
      false positive, and the warnings are frequent enough (and big enough)
      that they can easily hide real problems that you don't notice in the
      noise generated by -Wmaybe-uninitialized.
      
      The warning is good in theory, but this is a classic case of a warning
      that causes more problems than the warning can solve.
      
      If gcc gets better at avoiding false positives, we may be able to
      re-enable this warning.  But as is, we're better off without it, and I
      want to be able to see the *real* warnings.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6e8d666e
  6. 27 7月, 2016 4 次提交
  7. 23 7月, 2016 3 次提交
    • 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
    • G
      scripts/dtc: dt_to_config - kernel config options for a devicetree · ca0cd118
      Gaurav Minocha 提交于
      Determining which kernel config options need to be enabled for a
      given devicetree can be a painful process.  Create a new tool to
      find the drivers that may match a devicetree node compatible,
      find the kernel config options that enable the driver, and
      optionally report whether the kernel config option is enabled.
      Signed-off-by: NGaurav Minocha <gaurav.minocha.os@gmail.com>
      Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      ca0cd118
  8. 22 7月, 2016 9 次提交
    • T
      scripts: Fix size mismatch of kexec_purgatory_size · 21532b9e
      Tautschnig, Michael 提交于
      bin2c is used to create a valid C file out of a binary file where two
      symbols will be globally defined: <name> and <name>_size. <name> is
      passed as the first parameter of the host binary.
      
      Building using goto-cc reported that the purgatory binary code (the only
      current user of this utility) declares kexec_purgatory_size as 'size_t'
      where bin2c generate <name>_size to be 'int' so in a 64-bit host where
      sizeof(size_t) > sizeof(int) this type mismatch will always yield the
      wrong value for big-endian architectures while for little-endian it will
      be wrong if the object laid in memory directly after
      kexec_purgatory_size contains non-zero value at the time of reading.
      
      This commit changes <name>_size to be size_t instead.
      
      Note:
      
      Another way to fix the problem is to change the type of
      kexec_purgatory_size to be 'int' as there's this check in code:
      (kexec_purgatory_size <= 0)
      Signed-off-by: NMichael Tautschnig <tautschn@amazon.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Acked-by: NDave Young <dyoung@redhat.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      21532b9e
    • L
      scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci · cc65e823
      Luis R. Rodriguez 提交于
      Make use of the new Requires: tag to be able to specify coccinelle binary
      version requirements. The cocci file device_node_continue.cocci requires at
      least coccinelle 1.0.4.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
      Acked-by: NNicolas Palix <nicolas.palix@imag.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      cc65e823
    • L
      coccicheck: refer to Documentation/coccinelle.txt and wiki · c100d537
      Luis R. Rodriguez 提交于
      Refer to the Documentation/coccinelle.txt and supplemental documentation
      on the wiki:
      
      https://bottest.wiki.kernel.org/coccicheck
      
      This page shall always refer to the linux-next iteration of scripts/coccicheck.
      
      v4: only refer to the wiki as supplemental documentation, and also
          update Documentation/coccinelle.txt.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NNicolas Palix <nicolas.palix@imag.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      c100d537
    • L
      coccicheck: add support for requring a coccinelle version · a9e064c0
      Luis R. Rodriguez 提交于
      Enable Coccinelle SmPL patches to require a specific version of
      Coccinelle. In the event that the version does not match we just
      inform the user, if the user asked to go through all SmPL patches
      we just inform them of the need for a new version of coccinelle for
      the SmPL patch and continue on with the rest.
      
      This uses the simple kernel scripts/ld-version.sh to create a weight
      on the version provided by spatch. The -dirty attribute is ignored if
      supplied, the benefit of scripts/ld-version.sh is it has a long history
      and well tested.
      
      While at it, document the // Options stuff as well.
      
      v4: Document // Options and // Requires as well on
          Documentation/coccinelle.txt.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NNicolas Palix <nicolas.palix@imag.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      a9e064c0
    • L
      coccicheck: replace --very-quiet with --quiet when debugging · 5c384dba
      Luis R. Rodriguez 提交于
      When debugging (using --profile or --show-trying) you want to
      avoid supressing output,  use --quiet instead. While at it, extend
      documentation for SPFLAGS use.
      
      For instance one can use:
      
      $ export COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci
      $ make coccicheck DEBUG_FILE="poo.err" MODE=report SPFLAGS="--profile --show-trying" M=./drivers/mfd/arizona-irq.c
      
      Expand Documentation/coccinelle.txt as well.
      
      v4: expand Documentation/coccinelle.txt
      v3: rebased, resolve conflicts, expand Documentation/coccinelle.txt
      v2: use egrep instead of the *"=--option"* check, this doesn't work for
          disjunctions.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      5c384dba
    • L
      coccicheck: add support for DEBUG_FILE · be1fa900
      Luis R. Rodriguez 提交于
      Enable to capture stderr via a DEBUG_FILE variable passed to
      coccicheck. You can now do:
      
      $ rm -f cocci.err
      $ export COCCI=scripts/coccinelle/free/kfree.cocci
      $ make coccicheck MODE=report DEBUG_FILE=cocci.err
      ...
      $ cat cocci.err
      
      This will be come more useful once we add support to
      use more things which would go into stderr, such as
      profiling. That will be done separately in another
      commit.
      
      Expand Documentation/coccinelle.txt with details.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NNicolas Palix <nicolas.palix@imag.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      be1fa900
    • L
      coccicheck: enable parmap support · c930a1b2
      Luis R. Rodriguez 提交于
      Coccinelle has had parmap support since 1.0.2, this means
      it supports --jobs, enabling built-in multithreaded functionality,
      instead of needing one to script it out. Just look for --jobs
      in the help output to determine if this is supported and use it
      only if your number of processors detected is > 1.
      
      If parmap is enabled also enable the load balancing to be dynamic, so
      that if a thread finishes early we keep feeding it.
      
      stderr is currently sent to /dev/null, addressing a way to capture
      that will be addressed next.
      
      If --jobs is not supported we fallback to the old mechanism.
      We expect to deprecate the old mechanism as soon as we can get
      confirmation all users are ready.
      
      While at it propagate back into the shell script any coccinelle error
      code. When used in serialized mode where all cocci files are run this
      also stops processing if an error has occured. This lets us handle some
      errors in coccinelle cocci files and if they bail out we should inspect
      the errors. This will be more useful later to help annotate coccinelle
      version dependency requirements. This will let you run only SmPL files
      that your system supports.
      
      Extend Documentation/coccinelle.txt as well.
      
      As a small example, prior to this change, on an 8-core system:
      
      Before:
      
      $ export COCCI=scripts/coccinelle/free/kfree.cocci
      $ time make coccicheck MODE=report
      ...
      
      real    29m14.912s
      user    103m1.796s
      sys     0m4.464s
      
      After:
      
      real    16m22.435s
      user    128m30.060s
      sys     0m2.712s
      
      v4:
      
      o expand Documentation/coccinelle.txt to reflect parmap support info
      o update commit log to reflect what we actually do now with stderr
      o split out DEBUG_FILE use into another patch
      o detect number of CPUs and if its 1 then skip parmap support,
        note that if you still support parmap, but have 1 CPU you will
        also go through the new branches, so the old complex multithreaded process
        is skipped as well.
      
      v3:
      
      o move USE_JOBS to avoid being overriden
      
      v2:
      
      o redirect coccinelle stderr to /dev/null by default and
        only if DEBUG_FILE is used do we pass it to a file
      o fix typo of paramap/parmap
      Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NNicolas Palix <nicolas.palix@imag.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      c930a1b2
    • L
      coccicheck: make SPFLAGS more useful · 8e826ad5
      Luis R. Rodriguez 提交于
      SPFLAGS is set early, it means that any heuristics done on
      coccicheck cannot be overridden currently. Move SPFLAGS
      after OPTIONS and set this at the end. This lets you override
      any heuristics as coccinelle treats conflicts by only listening
      to the last option that makes sense.
      
      v3: this patch was added in the v3 series
      v4: Update Documentation/coccinelle.txt explaining how
          SPFLAGS works as well.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NNicolas Palix <nicolas.palix@imag.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      8e826ad5
    • L
      coccicheck: move spatch binary check up · 13d94865
      Luis R. Rodriguez 提交于
      This has no functional changes. This is being done
      to enable us to later use spatch binary for some
      flag checking for certain features early on.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NNicolas Palix <nicolas.palix@imag.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      13d94865
  9. 19 7月, 2016 3 次提交
    • W
      builddeb: really include objtool binary in headers package · 15f6d337
      Wilfried Klaebe 提交于
      On May 4th, Bjørn Mork provided patch 697bbc7b ("builddeb: include
      objtool binary in headers package"). However, that one only works if
      $srctree=$objtree, because the objtool binaries are not written to the
      srctree, but to the objtree.
      Signed-off-by: NWilfried Klaebe <linux-kernel@lebenslange-mailadresse.de>
      Fixes: 697bbc7b ("builddeb: include objtool binary in headers package")
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      15f6d337
    • A
      Kbuild: don't add obj tree in additional includes · db547ef1
      Arnd Bergmann 提交于
      When building with separate object directories and driver specific
      Makefiles that add additional header include paths, Kbuild adjusts
      the gcc flags so that we include both the directory in the source
      tree and in the object tree.
      
      However, due to another bug I fixed earlier, this did not actually
      include the correct directory in the object tree, so we know that
      we only really need the source tree here. Also, including the
      object tree sometimes causes warnings about nonexisting directories
      when the include path only exists in the source.
      
      This changes the logic to only emit the -I argument for the srctree,
      not for objects. We still need both $(srctree)/$(src) and $(obj)
      though, so I'm adding them manually.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      db547ef1
    • A
      Kbuild: don't add ../../ to include path · b999596b
      Arnd Bergmann 提交于
      When we build with O=objdir and objdir is directly below the source tree,
      $(srctree) becomes '..'.
      
      When a Makefile adds a CFLAGS option like -Ipath/to/headers and
      we are building with a separate object directory, Kbuild tries to
      add two -I options, one for the source tree and one for the object
      tree. An absolute path is treated as a special case, and don't add
      this one twice. This also normally catches -I$(srctree)/$(src)
      as $(srctree) usually is an absolute directory like /home/arnd/linux/.
      
      The combination of the two behaviors however results in an invalid
      path name to be included: we get both ../$(src) and ../../$(src),
      the latter one pointing outside of the source tree, usually to a
      nonexisting directory. Building with 'make W=1' makes this obvious:
      
      cc1: error: ../../arch/arm/mach-s3c24xx/include: No such file or directory [-Werror=missing-include-dirs]
      
      This adds another special case, treating path names starting with ../
      like those starting with / so we don't try to prefix that with
      $(srctree).
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      b999596b
  10. 18 7月, 2016 3 次提交
  11. 16 7月, 2016 1 次提交
  12. 15 7月, 2016 3 次提交