1. 14 Jun, 2018 1 commit
  2. 12 Aug, 2017 1 commit
  3. 21 Feb, 2017 1 commit
    • Bhumika Goyal's avatar
      ALSA: pci: constify snd_kcontrol_new structures · f3b827e0
      Bhumika Goyal authored
      Declare snd_kcontrol_new structures as const as they are only passed as
      an argument to the function snd_ctl_new1. This argument is of type
      const, so snd_kcontrol_new structures having the same property can be
      made const too.
      Done using Coccinelle:
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      static struct snd_kcontrol_new i@p = {...};
      identifier r1.i;
      position p;
      expression e1;
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      struct snd_kcontrol_new i;
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  4. 02 Sep, 2016 1 commit
    • Julia Lawall's avatar
      ALSA: constify snd_pcm_ops structures · 6769e988
      Julia Lawall authored
      Check for snd_pcm_ops structures that are only stored in the ops field of a
      snd_soc_platform_driver structure or passed as the third argument to
      snd_pcm_set_ops.  The corresponding field or parameter is declared const,
      so snd_pcm_ops structures that have this property can be declared as const
      The semantic patch that makes this change is as follows:
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      static struct snd_pcm_ops i@p = { ... };
      identifier r.i;
      struct snd_soc_platform_driver e;
      position p;
      e.ops = &i@p;
      identifier r.i;
      expression e1, e2;
      position p;
      snd_pcm_set_ops(e1, e2, &i@p)
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      struct snd_pcm_ops e;
      @depends on !bad disable optional_qualifier@
      identifier r.i;
       struct snd_pcm_ops i = { ... };
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  5. 21 Oct, 2015 1 commit
  6. 26 May, 2015 2 commits
    • Takashi Iwai's avatar
      ALSA: lx6464es: Use NULL for pointers · e42e748e
      Takashi Iwai authored
      Spotted by sparse:
        sound/pci/lx6464es/lx6464es.c:415:47: warning: Using plain integer as NULL pointer
        sound/pci/lx6464es/lx6464es.c:417:48: warning: Using plain integer as NULL pointer
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    • Takashi Iwai's avatar
      ALSA: lx6464es: Fix duplicated SSID entries · 1983126f
      Takashi Iwai authored
      PCI_DEVICE() macro itself defines SSID entries while we override them
      after that.  Replace with a more appropriate macro, PCI_DEVICE_SUB()
      to define all ID values properly.
      Spotted by sparse:
        sound/pci/lx6464es/lx6464es.c:60:11: warning: Initializer entry defined twice
        sound/pci/lx6464es/lx6464es.c:61:12:   also defined here
        sound/pci/lx6464es/lx6464es.c:64:11: warning: Initializer entry defined twice
        sound/pci/lx6464es/lx6464es.c:65:12:   also defined here
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  7. 16 Apr, 2015 1 commit
    • Quentin Lambert's avatar
      ALSA: remove deprecated use of pci api · 412b979c
      Quentin Lambert authored
      Replace occurences of the pci api by appropriate call to the dma api.
      A simplified version of the semantic patch that finds this problem is as
      follows: (http://coccinelle.lip6.fr
      idexpression id;
      position p;
        pci_dma_supported@p ( id, ...)
        pci_alloc_consistent@p ( id, ...)
      idexpression id;
      position deprecated.p;
      ...when != &id->dev
         when != pci_get_drvdata ( id )
         when != pci_enable_device ( id )
        pci_dma_supported@p ( id, ...)
        pci_alloc_consistent@p ( id, ...)
      @depends on !bad1@
      idexpression id;
      expression direction;
      position deprecated.p;
      - pci_dma_supported@p ( id,
      + dma_supported ( &id->dev,
      + , GFP_ATOMIC
      - pci_alloc_consistent@p ( id,
      + dma_alloc_coherent ( &id->dev,
      + , GFP_ATOMIC
      Signed-off-by: default avatarQuentin Lambert <lambert.quentin@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  8. 15 Sep, 2014 1 commit
    • Takashi Iwai's avatar
      ALSA: lx6464es: Use nonatomic PCM ops · 6336c20c
      Takashi Iwai authored
      Like the other previous changes, this patch for lx6464es takes the
      same strategy for converting to nonatomic PCM ops: replacing spinlock
      with mutex, converting the irq tasklet to the threaded irq, and
      merging the trigger tasklets back to the trigger callback.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  9. 12 Aug, 2014 1 commit
  10. 26 Feb, 2014 1 commit
  11. 12 Feb, 2014 1 commit
  12. 06 Nov, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: lx6464es: Fix pointer cast compile warnings · 293db842
      Takashi Iwai authored
      The warnings are really harmless but annoying.  Since they are only
      about debug prints, and it's at most 32bit DMA, let's just cast to
      unsigned long.
        sound/pci/lx6464es/lx6464es.c:457:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        sound/pci/lx6464es/lx_core.c:1195:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  13. 29 May, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove · 20a24225
      Takashi Iwai authored
      As drvdata is cleared to NULL at probe failure or at removal by the
      driver core, we don't have to call pci_set_drvdata(pci, NULL) any
      longer in each driver.
      The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in
      hda_intel.c.  Since this function itself releases the card instance,
      we need to clear drvdata here as well, so that it won't be released
      doubly in the remove callback.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  14. 07 Dec, 2012 1 commit
  15. 14 Aug, 2012 1 commit
  16. 24 Apr, 2012 1 commit
  17. 19 Dec, 2011 1 commit
  18. 25 Jun, 2011 1 commit
  19. 10 Jun, 2011 2 commits
    • Takashi Iwai's avatar
      ALSA: use KBUILD_MODNAME for request_irq argument in sound/pci/* · 934c2b6d
      Takashi Iwai authored
      The name argument of request_irq() appears in /proc/interrupts, and
      it's quite ugly when the name entry contains a space or special letters.
      In general, it's simpler and more readable when the module name appears
      there, so let's replace all entries with KBUILD_MODNAME.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    • Takashi Iwai's avatar
      ALSA: Use KBUILD_MODNAME for pci_driver.name entries · 3733e424
      Takashi Iwai authored
      The convention for pci_driver.name entry in kernel drivers seem to be
      the module name or equivalent ones.  But, so far, almost all PCI sound
      drivers use more verbose name like "ABC Xyz (12)", and these are fairly
      confusing when appearing as a file name.
      This patch converts the all pci_driver.name entries in sound/pci/* to
      use KBUILD_MODNAME for more unified appearance.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  20. 01 Nov, 2010 1 commit
  21. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  22. 09 Feb, 2010 1 commit
  23. 25 Jun, 2009 1 commit
  24. 19 Jun, 2009 1 commit
    • Andrew Morton's avatar
      convert some DMA_nnBIT_MASK() callers · 8e20ce94
      Andrew Morton authored
      We're about to make DMA_nnBIT_MASK() emit `deprecated' warnings.  Convert the
      remaining stragglers which are visible to the x86_64 build.
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Eric Moore <Eric.Moore@lsil.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Cc: Yi Zou <yi.zou@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  25. 11 Jun, 2009 1 commit
  26. 14 Apr, 2009 2 commits