1. 02 Nov, 2017 1 commit
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      How this work was done:
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
      All documentation files were explicitly excluded.
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
         For non */uapi/* files that summary was:
         SPDX license identifier                            # files
         GPL-2.0                                              11139
         and resulted in the first patch in this series.
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
         SPDX license identifier                            # files
         GPL-2.0 WITH Linux-syscall-note                        930
         and resulted in the second patch in this series.
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
         SPDX license identifier                            # files
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
         and that resulted in the third patch in this series.
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  2. 04 Jan, 2016 1 commit
    • Heiner Kallweit's avatar
      PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching · e0f03e87
      Heiner Kallweit authored
      I have a device (Nuvoton 6779D Super-IO IR RC with nuvoton-cir driver)
      which works after initial boot but not any longer if I unload and
      re-load the driver module.
      Digging into the issue I found that unloading the driver calls
      pnp_disable_dev although the driver has flag PNP_DRIVER_RES_DO_NOT_CHANGE
      set. IMHO this is not right.
      Let's have a look at the call chain when probing a device:
      1. attaches the device
      2. if it's not active and PNP_DRIVER_RES_DO_NOT_CHANGE is not set
         it gets activated
      3. probes driver
      I think pnp_device_remove should do it in reverse order and also
      respect PNP_DRIVER_RES_DO_NOT_CHANGE. Therefore:
      1. call drivers remove callback
      2. if device is active and PNP_DRIVER_RES_DO_NOT_CHANGE is not set
         disable it
      3. detach device
      The change works for me and sounds logical to me.
      However I don't know the pnp driver in detail so I might be wrong.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  3. 18 Mar, 2015 1 commit
  4. 02 Feb, 2015 1 commit
  5. 05 Dec, 2013 1 commit
  6. 17 Oct, 2013 1 commit
  7. 11 Sep, 2013 1 commit
    • Shuah Khan's avatar
      pnp: change pnp bus pm_ops to invoke pnp driver dev_pm_ops if specified · 729377d5
      Shuah Khan authored
      pnp_bus_suspend() and pnp_bus_resume() invoke legacy pm_ops from
      pnp_driver.  Changed pnp_bus_suspend() and pnp_bus_resume() to check if
      pnp driver has dev_pm_ops and call.  If dev_pm_ops don't exist, then call
      use legacy pm_ops.  Without this change, pnp_driver dev_pm_ops will not
      get called.
      In addition to the pnp driver bus pm_ops change to invoke driver
      dev_pm_ops, this patch set contains changes to rtc-cmos, tpm_tis, and
      apple-gmux pnp drivers to convert from legacy pm_ops to dev_pm_ops.
      This patch (of 4):
      pnp_bus_suspend() and pnp_bus_resume() invoke legacy pm_ops from
      pnp_driver.  Changed pnp_bus_suspend() and pnp_bus_resume() to check if
      pnp driver has dev_pm_ops and call.  If dev_pm_ops don't exist, then call
      use legacy pm_ops.  Without this change, pnp_driver dev_pm_ops will not
      get called.
      Signed-off-by: default avatarShuah Khan <shuah.kh@samsung.com>
      Cc: Matthew Garrett <matthew.garrett@nebula.com>
      Cc: Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
      Cc: Ashley Lai <ashley@ashleylai.com>
      Cc: Rajiv Andrade <mail@srajiv.net>
      Cc: Marcel Selhorst <tpmdd@selhorst.net>
      Cc: Sirrix AG <tpmdd@sirrix.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Peter Hüwe <PeterHuewe@gmx.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  8. 27 Jul, 2013 1 commit
  9. 11 Jan, 2011 1 commit
    • Rafael J. Wysocki's avatar
      PNP / ACPI: Use DEVICE_ACPI_HANDLE() for device ACPI handle access · cc8e7a35
      Rafael J. Wysocki authored
      The PNP ACPI driver squirrels the ACPI handles of PNP devices' ACPI
      companions, but this isn't correct, because those handles should be
      accessed using the DEVICE_ACPI_HANDLE() macro operating on struct
      device objects.
      Using DEVICE_ACPI_HANDLE() in the PNP ACPI driver instead of the
      driver's own copies of the ACPI handles allows us to avoid a problem
      with docking stations where a machine docked before suspend to RAM
      and undocked while suspended crashes during the subsequent resume (in
      that case the ACPI companion of the PNP device in question doesn't
      exist any more while the device is being resumed).  It also allows us
      to avoid the problem where suspend to RAM fails when the machine was
      undocked while suspended before (again, the ACPI companion of the PNP
      device is not present any more while it is being suspended).
      This change doesn't fix all of the the PNP ACPI driver's problems
      with PNP devices in docking stations (generally speaking, the driver
      has no idea that devices can come and go and doesn't even attempt to
      handle such events), but at least it makes suspend work for the
      users of docking stations who don't use the PNP devices located in
      References: https://bugzilla.kernel.org/show_bug.cgi?id=15100Reported-and-tested-by: Toralf Förster's avatarToralf Förster <toralf.foerster@gmx.de>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
  10. 01 Oct, 2010 1 commit
  11. 22 Sep, 2009 1 commit
  12. 16 Oct, 2008 1 commit
  13. 11 Oct, 2008 1 commit
  14. 29 Apr, 2008 1 commit
  15. 28 Apr, 2008 1 commit
  16. 06 Feb, 2008 1 commit
    • Rene Herman's avatar
      PNP: do not test PNP_DRIVER_RES_DO_NOT_CHANGE on suspend/resume · 5d38998e
      Rene Herman authored
      The PNP_DRIVER_RES_DO_NOT_CHANGE flag is meant to signify that the PNP core
      should not change resources for the device -- not that it shouldn't
      disable/enable the device on suspend/resume.
      ALSA ISAPnP drivers set PNP_DRIVER_RES_DO_NOT_CHANAGE (0x0001) through
      setting PNP_DRIVER_RES_DISABLE (0x0003).  The latter including the former
      may in itself be considered rather unexpected but doesn't change that
      suspend/resume wouldn't seem to have any business testing the flag.
      As reported by Ondrej Zary for snd-cs4236, ALSA driven ISAPnP cards don't
      survive swsusp hibernation with the resume skipping setting the resources
      due to testing the flag -- the same test in the suspend path isn't enough
      to keep hibernation from disabling the card it seems.
      These tests were added (in 2005) by Piere Ossman in commit
      68094e32, "alsa: Improved PnP suspend
      support" who doesn't remember why.  This deletes them.
      Signed-off-by: René Herman's avatarRene Herman <rene.herman@gmail.com>
      Tested-by: default avatarOndrej Zary <linux@rainbow-software.org>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Pierre Ossman <drzeus@drzeus.cx>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  17. 17 Oct, 2007 1 commit
  18. 24 Aug, 2007 2 commits
  19. 26 Jul, 2007 2 commits
  20. 22 Jul, 2007 1 commit
  21. 30 Jun, 2006 1 commit
  22. 27 Mar, 2006 1 commit
  23. 13 Jan, 2006 1 commit
  24. 03 Jan, 2006 2 commits
  25. 07 Nov, 2005 1 commit
    • Adrian Bunk's avatar
      [PATCH] drivers/pnp/: cleanups · b449f63c
      Adrian Bunk authored
      This patch contains the following possible cleanups:
      - make needlessly global code static
      - #if 0 the following unused global function:
        - core.c: pnp_remove_device
      - #if 0 the following unneeded EXPORT_SYMBOL's:
        - card.c: pnp_add_card
        - card.c: pnp_remove_card
        - card.c: pnp_add_card_device
        - card.c: pnp_remove_card_device
        - card.c: pnp_add_card_id
        - core.c: pnp_register_protocol
        - core.c: pnp_unregister_protocol
        - core.c: pnp_add_device
        - core.c: pnp_remove_device
        - pnpacpi/core.c: pnpacpi_protocol
        - driver.c: pnp_add_id
        - isapnp/core.c: isapnp_read_byte
        - manager.c: pnp_auto_config_dev
        - resource.c: pnp_register_dependent_option
        - resource.c: pnp_register_independent_option
        - resource.c: pnp_register_irq_resource
        - resource.c: pnp_register_dma_resource
        - resource.c: pnp_register_port_resource
        - resource.c: pnp_register_mem_resource
      Note that this patch #if 0's exactly one functions and removes no
      functions.  Most it does is the #if 0 of EXPORT_SYMBOL's, so if any modular
      code will use any of them, re-adding will be trivial.
      Modular ISAPnP might be interesting in some cases, but this is more legacy
      code.  If someone would work on it to sort all the issues out (starting
      with the point that most users of __ISAPNP__ will have to be fixed)
      re-enabling the required EXPORT_SYMBOL's won't be hard for him.
      Signed-off-by: Adrian Bunk's avatarAdrian Bunk <bunk@stusta.de>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  26. 07 Sep, 2005 1 commit
  27. 20 Jun, 2005 1 commit
  28. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      Let it rip!