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
         lines).
      
      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: 's avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: 's avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: 's avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  2. 23 Aug, 2017 1 commit
  3. 19 Aug, 2017 1 commit
  4. 17 Aug, 2017 1 commit
  5. 01 Aug, 2016 1 commit
  6. 09 Mar, 2016 1 commit
    • Luis R. Rodriguez's avatar
      dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() · f6e45661
      Luis R. Rodriguez authored
      Rename dma_*_writecombine() to dma_*_wc(), so that the naming
      is coherent across the various write-combining APIs. Keep the
      old names for compatibility for a while, these can be removed
      at a later time. A guard is left to enable backporting of the
      rename, and later remove of the old mapping defines seemlessly.
      
      Build tested successfully with allmodconfig.
      
      The following Coccinelle SmPL patch was used for this simple
      transformation:
      
      @ rename_dma_alloc_writecombine @
      expression dev, size, dma_addr, gfp;
      @@
      
      -dma_alloc_writecombine(dev, size, dma_addr, gfp)
      +dma_alloc_wc(dev, size, dma_addr, gfp)
      
      @ rename_dma_free_writecombine @
      expression dev, size, cpu_addr, dma_addr;
      @@
      
      -dma_free_writecombine(dev, size, cpu_addr, dma_addr)
      +dma_free_wc(dev, size, cpu_addr, dma_addr)
      
      @ rename_dma_mmap_writecombine @
      expression dev, vma, cpu_addr, dma_addr, size;
      @@
      
      -dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size)
      +dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size)
      
      We also keep the old names as compatibility helpers, and
      guard against their definition to make backporting easier.
      
      Generated-by: Coccinelle SmPL
      Suggested-by: 's avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: 's avatarLuis R. Rodriguez <mcgrof@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: airlied@linux.ie
      Cc: akpm@linux-foundation.org
      Cc: benh@kernel.crashing.org
      Cc: bhelgaas@google.com
      Cc: bp@suse.de
      Cc: dan.j.williams@intel.com
      Cc: daniel.vetter@ffwll.ch
      Cc: dhowells@redhat.com
      Cc: julia.lawall@lip6.fr
      Cc: konrad.wilk@oracle.com
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-pci@vger.kernel.org
      Cc: luto@amacapital.net
      Cc: mst@redhat.com
      Cc: tomi.valkeinen@ti.com
      Cc: toshi.kani@hp.com
      Cc: vinod.koul@intel.com
      Cc: xen-devel@lists.xensource.com
      Link: http://lkml.kernel.org/r/1453516462-4844-1-git-send-email-mcgrof@do-not-panic.comSigned-off-by: 's avatarIngo Molnar <mingo@kernel.org>
      f6e45661
  7. 30 Sep, 2015 1 commit
  8. 16 Sep, 2015 1 commit
    • Robert Jarzmik's avatar
      ASoC: fix broken pxa SoC support · 3c8f7710
      Robert Jarzmik authored
      The previous fix of pxa library support, which was introduced to fix the
      library dependency, broke the previous SoC behavior, where a machine
      code binding pxa2xx-ac97 with a coded relied on :
       - sound/soc/pxa/pxa2xx-ac97.c
       - sound/soc/codecs/XXX.c
      
      For example, the mioa701_wm9713.c machine code is currently broken. The
      "select ARM" statement wrongly selects the soc/arm/pxa2xx-ac97 for
      compilation, as per an unfortunate fate SND_PXA2XX_AC97 is both declared
      in sound/arm/Kconfig and sound/soc/pxa/Kconfig.
      
      Fix this by ensuring that SND_PXA2XX_SOC correctly triggers the correct
      pxa2xx-ac97 compilation.
      
      Fixes: 846172df ("ASoC: fix SND_PXA2XX_LIB Kconfig warning")
      Signed-off-by: 's avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: 's avatarMark Brown <broonie@kernel.org>
      3c8f7710
  9. 04 Jan, 2015 1 commit
  10. 09 Nov, 2014 1 commit
    • Takashi Iwai's avatar
      ALSA: pcm: Add snd_pcm_stop_xrun() helper · 1fb8510c
      Takashi Iwai authored
      Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
      lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
      existing open codes with this helper.
      
      The function checks the PCM running state to prevent setting the wrong
      state, too, for more safety.
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      1fb8510c
  11. 20 Oct, 2014 1 commit
  12. 09 Jun, 2014 1 commit
  13. 20 May, 2014 1 commit
    • Arnd Bergmann's avatar
      ASoC: pxa: remove mach header dependency · b4528141
      Arnd Bergmann authored
      As we are moving the mmp platform towards multiplatform support,
      we have to stop including platform header files.
      
      This changes the pxa-ssp sound driver file to no longer depend
      on mach/hardware.h and mach/dma.h. The code using the definitions
      from those headers is actually gone already, the only thing
      that was still being used was the pxa_dma_desc typedef, which
      we can easily work around by using the normal 'struct pxa_dma_desc'
      name.
      
      The pxa2xx-dma driver still uses this header, so we include it
      explicitly there, which is ok because that is only used on pxa,
      not on mmp.
      Signed-off-by: 's avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: 's avatarXia Kaixu <kaixu.xia@linaro.org>
      Signed-off-by: 's avatarMark Brown <broonie@linaro.org>
      b4528141
  14. 14 Feb, 2014 1 commit
  15. 03 Dec, 2013 1 commit
  16. 06 Nov, 2013 1 commit
  17. 31 Oct, 2013 1 commit
    • Russell King's avatar
      DMA-API: sound: fix dma mask handling in a lot of drivers · c9bd5e69
      Russell King authored
      This code sequence is unsafe in modules:
      
      static u64 mask = DMA_BIT_MASK(something);
      ...
      	if (!dev->dma_mask)
      		dev->dma_mask = &mask;
      
      as if a module is reloaded, the mask will be pointing at the original
      module's mask address, and this can lead to oopses.  Moreover, they
      all follow this with:
      
      	if (!dev->coherent_dma_mask)
      		dev->coherent_dma_mask = mask;
      
      where 'mask' is the same value as the statically defined mask, and this
      bypasses the architecture's check on whether the DMA mask is possible.
      
      Fix these issues by using the new dma_coerce_coherent_and_mask()
      function.
      Acked-by: 's avatarMark Brown <broonie@linaro.org>
      Acked-by: 's avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: 's avatarRussell King <rmk+kernel@arm.linux.org.uk>
      c9bd5e69
  18. 29 Oct, 2013 1 commit
  19. 17 Oct, 2013 1 commit
  20. 15 Aug, 2013 1 commit
  21. 15 Jul, 2013 1 commit
  22. 29 May, 2013 1 commit
  23. 23 May, 2013 1 commit
  24. 08 Jan, 2013 3 commits
    • Mike Dunn's avatar
      ALSA: pxa27x: rename pxa27x_assert_ac97reset() · 053fe0f1
      Mike Dunn authored
      This patch does nothing functionally, it just gives the function a new name and
      modifies the prototype slightly in order to clarify what the function is doing
      (which is not necessarily asserting the reset).
      Some commentary also added.
      
      Tested on a palm treo 680 machine.
      Signed-off-by: 's avatarMike Dunn <mikedunn@newsguy.com>
      Acked-by: 's avatarIgor Grinberg <grinberg@compulab.co.il>
      Signed-off-by: 's avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      053fe0f1
    • Mike Dunn's avatar
      ALSA: pxa27x: fix ac97 warm reset · 3b4bc7bc
      Mike Dunn authored
      This patch fixes some code that implements a work-around to a hardware bug in
      the ac97 controller on the pxa27x.  A bug in the controller's warm reset
      functionality requires that the mfp used by the controller as the AC97_nRESET
      line be temporarily reconfigured as a generic output gpio (AF0) and manually
      held high for the duration of the warm reset cycle.  This is what was done in
      the original code, but it was broken long ago by commit fb1bf8cd
          ([ARM] pxa: introduce processor specific pxa27x_assert_ac97reset())
      which changed the mfp to a GPIO input instead of a high output.
      
      The fix requires the ac97 controller to obtain the gpio via gpio_request_one(),
      with arguments that configure the gpio as an output initially driven high.
      
      Tested on a palm treo 680 machine.  Reportedly, this broken code only prevents a
      warm reset on hardware that lacks a pull-up on the line, which appears to be the
      case for me.
      Signed-off-by: 's avatarMike Dunn <mikedunn@newsguy.com>
      Signed-off-by: 's avatarIgor Grinberg <grinberg@compulab.co.il>
      Signed-off-by: 's avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: stable@vger.kernel.org
      3b4bc7bc
    • Mike Dunn's avatar
      ALSA: pxa27x: fix ac97 cold reset · 41b645c8
      Mike Dunn authored
      Cold reset on the pxa27x currently fails and
      
           pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
      
      appears in the kernel log.  Through trial-and-error (the pxa270 developer's
      manual is mostly incoherent on the topic of ac97 reset), I got cold reset to
      complete by setting the WARM_RST bit in the GCR register (and later noticed that
      pxa3xx does this for cold reset as well).  Also, a timeout loop is needed to
      wait for the reset to complete.
      
      Tested on a palm treo 680 machine.
      Signed-off-by: 's avatarMike Dunn <mikedunn@newsguy.com>
      Acked-by: 's avatarIgor Grinberg <grinberg@compulab.co.il>
      Signed-off-by: 's avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: stable@vger.kernel.org
      41b645c8
  25. 07 Dec, 2012 2 commits
  26. 09 Aug, 2012 1 commit
  27. 03 Jul, 2012 1 commit
  28. 25 Mar, 2012 1 commit
    • Rob Herring's avatar
      ARM: pxa: use common IOMEM definition · 23019a73
      Rob Herring authored
      pxa was missed in the moving of IOMEM to a common definition, so lots of
      IOMEM redefined warnings were introduced. So remove pxa IOMEM definition
      and fix all the fallout.
      Reported-by: 's avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: 's avatarRob Herring <rob.herring@calxeda.com>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: rtc-linux@googlegroups.com
      Cc: alsa-devel@alsa-project.org
      23019a73
  29. 16 Mar, 2012 1 commit
  30. 26 Jan, 2012 1 commit
  31. 27 Nov, 2011 1 commit
  32. 22 Nov, 2011 1 commit
  33. 31 Oct, 2011 1 commit
  34. 22 Sep, 2011 1 commit
  35. 03 Apr, 2011 1 commit
  36. 23 Feb, 2011 1 commit
  37. 07 Feb, 2011 1 commit
    • Russell King's avatar
      ALSA: AACI: allow writes to MAINCR to take effect · 7c289385
      Russell King authored
      The AACI TRM requires the MAINCR enable bit to be held zero for two
      bitclk cycles plus three apb_pclk cycles.  Use a delay of 1us to
      ensure this.
      
      Ensure that writes to MAINCR to change the addressed codec only happen
      when required, and that they take effect in a similar manner to the
      above, otherwise we seem to occasionally have stuck slot busy bits.
      Signed-off-by: 's avatarRussell King <rmk+kernel@arm.linux.org.uk>
      7c289385