Skip to content
Snippets Groups Projects
  1. May 14, 2019
  2. May 10, 2019
    • Masahiro Yamada's avatar
      kconfig: make parent directories for the saved .config as needed · 580c5b3e
      Masahiro Yamada authored
      
      With menuconfig / nconfig, users can input any file path from the
      "Save" menu, but it fails if the parent directory does not exist.
      
      Why not create the parent directory automatically. I think this is
      a user-friendly behavior.
      
      I changed the error messages in menuconfig / nconfig.
      
      "Nonexistent directory" is no longer the most likely reason of the
      failure. Perhaps, the user specified the existing directory, or
      attempted to write to the location without write permission.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      580c5b3e
    • Masahiro Yamada's avatar
      kconfig: do not write .config if the content is the same · 67424f61
      Masahiro Yamada authored
      
      Kconfig updates the .config when it exits even if its content is
      exactly the same as before. Since its timestamp becomes newer than
      that of other build artifacts, additional processing is invoked,
      which is annoying.
      
      - syncconfig is invoked to update include/config/auto.conf, etc.
      
      - kernel/configs.o is recompiled if CONFIG_IKCONFIG is enabled,
        then vmlinux is relinked as well.
      
      If the .config is not changed at all, we do not have to even
      touch it. Just bail out showing "No change to .config".
      
        $ make allmodconfig
        scripts/kconfig/conf  --allmodconfig Kconfig
        #
        # configuration written to .config
        #
        $ make allmodconfig
        scripts/kconfig/conf  --allmodconfig Kconfig
        #
        # No change to .config
        #
      
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67424f61
    • Masahiro Yamada's avatar
      kconfig: do not accept a directory for configuration output · ceb7f329
      Masahiro Yamada authored
      Currently, conf_write() can be called with a directory name instead
      of a file name. As far as I see, this can happen for menuconfig,
      nconfig, gconfig.
      
      If it is given with a directory path, conf_write() kindly appends
      getenv("KCONFIG_CONFIG"), but this ends up with hacky dir/basename
      handling, and screwed up in corner-cases like "what if KCONFIG_CONFIG
      is an absolute path?" as discussed before:
      
        https://patchwork.kernel.org/patch/9910037/
      
      
      
      Since conf_write() is already messed up, I'd say "do not do it".
      Please pass a file path all the time. If a directory path is specified
      for the configuration output, conf_write() will simply error out.
      
      Now that the tmp file is created in the same directory as the .config,
      the previously reported "what if KCONFIG_CONFIG points to a different
      file system?" has been solved.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Nicolas Porcel <nicolasporcel06@gmail.com>
      ceb7f329
  3. May 09, 2019
  4. Apr 09, 2019
  5. Mar 29, 2019
  6. Mar 28, 2019
  7. Mar 17, 2019
    • Masahiro Yamada's avatar
      kconfig: remove stale lxdialog/.gitignore · c71bb9f8
      Masahiro Yamada authored
      
      When this .gitignore was added, lxdialog was an independent hostprogs-y.
      
      Now that all objects in lxdialog/ are directly linked to mconf, the
      lxdialog is no longer generated.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      c71bb9f8
    • Masahiro Yamada's avatar
      kbuild: force all architectures except um to include mandatory-y · 037fc336
      Masahiro Yamada authored
      
      Currently, every arch/*/include/uapi/asm/Kbuild explicitly includes
      the common Kbuild.asm file. Factor out the duplicated include directives
      to scripts/Makefile.asm-generic so that no architecture would opt out
      of the mandatory-y mechanism.
      
      um is not forced to include mandatory-y since it is a very exceptional
      case which does not support UAPI.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      037fc336
    • Masahiro Yamada's avatar
      kbuild: warn redundant generic-y · 7cbbbb8b
      Masahiro Yamada authored
      
      The generic-y is redundant under the following condition:
      
       - arch has its own implementation
      
       - the same header is added to generated-y
      
       - the same header is added to mandatory-y
      
      If a redundant generic-y is found, the warning like follows is displayed:
      
        scripts/Makefile.asm-generic:20: redundant generic-y found in arch/arm/include/asm/Kbuild: timex.h
      
      I fixed up arch Kbuild files found by this.
      
      Suggested-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      7cbbbb8b
    • Douglas Anderson's avatar
      Revert "modsign: Abort modules_install when signing fails" · f84dde10
      Douglas Anderson authored
      This reverts commit caf6fe91.
      
      The commit was fine but is no longer needed as of commit 3a2429e1
      ("kbuild: change if_changed_rule for multi-line recipe").  Let's go
      back to using ";" to be consistent.
      
      For some discussion, see:
      
      https://lkml.kernel.org/r/CAK7LNASde0Q9S5GKeQiWhArfER4S4wL1=R_FW8q0++_X3T5=hQ@mail.gmail.com
      
      
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      f84dde10
    • Arseny Maslennikov's avatar
      kbuild: deb-pkg: avoid implicit effects · f6d9db63
      Arseny Maslennikov authored
      
      * The man page for dpkg-source(1) notes:
      
      >      -b, --build directory [format-specific-parameters]
      >             Build  a  source  package  (--build since dpkg 1.17.14).
      >             <...>
      >
      >             dpkg-source will build the source package with the first
      >             format found in this ordered list: the format  indicated
      >             with  the  --format  command  line  option,  the  format
      >             indicated in debian/source/format, “1.0”.  The  fallback
      >             to “1.0” is deprecated and will be removed at some point
      >             in the future, you should always  document  the  desired
      >             source   format  in  debian/source/format.  See  section
      >             SOURCE PACKAGE FORMATS for an extensive  description  of
      >             the various source package formats.
      
        Thus it would be more foolproof to explicitly use 1.0 (as we always
        did) than to rely on dpkg-source's defaults.
      
      * In a similar vein, debian/rules is not made executable by mkdebian,
        and dpkg-source warns about that but still silently fixes the file.
        Let's be explicit once again.
      
      Signed-off-by: default avatarArseny Maslennikov <ar@cs.msu.ru>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      f6d9db63
    • Wen Yang's avatar
      coccinelle: semantic code search for missing put_device() · da9cfb87
      Wen Yang authored
      
      The of_find_device_by_node() takes a reference to the underlying device
      structure, we should release that reference.
      The implementation of this semantic code search is:
      In a function, for a local variable returned by calling
      of_find_device_by_node(),
      a, if it is released by a function such as
         put_device()/of_dev_put()/platform_device_put() after the last use,
         it is considered that there is no reference leak;
      b, if it is passed back to the caller via
         dev_get_drvdata()/platform_get_drvdata()/get_device(), etc., the
         reference will be released in other functions, and the current function
         also considers that there is no reference leak;
      c, for the rest of the situation, the current function should release the
         reference by calling put_device, this code search will report the
         corresponding error message.
      
      By using this semantic code search, we have found some object reference leaks,
      such as:
      commit 11907e9d ("ASoC: fsl-asoc-card: fix object reference leaks in
      fsl_asoc_card_probe")
      commit a12085d1 ("mtd: rawnand: atmel: fix possible object reference leak")
      commit 11493f26 ("mtd: rawnand: jz4780: fix possible object reference leak")
      
      There are still dozens of reference leaks in the current kernel code.
      
      Further, for the case of b, the object returned to other functions may also
      have a reference leak, we will continue to develop other cocci scripts to
      further check the reference leak.
      
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Reviewed-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Reviewed-by: default avatarMarkus Elfring <Markus.Elfring@web.de>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      da9cfb87
  8. Mar 13, 2019
  9. Mar 11, 2019
  10. Mar 08, 2019
  11. Mar 07, 2019
  12. Mar 06, 2019
Loading