Skip to content
  1. Apr 01, 2017
  2. Mar 29, 2017
  3. Mar 24, 2017
    • Arnd Bergmann's avatar
      ALSA: au88x0: avoid theoretical uninitialized access · 13f99ebd
      Arnd Bergmann authored
      
      
      The latest gcc-7.0.1 snapshot points out that we if nr_ch is zero, we never
      initialize some variables:
      
      sound/pci/au88x0/au88x0_core.c: In function 'vortex_adb_allocroute':
      sound/pci/au88x0/au88x0_core.c:2304:68: error: 'mix[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      sound/pci/au88x0/au88x0_core.c:2305:58: error: 'src[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      I assume this can never happen in practice, but adding a check here doesn't
      hurt either and avoids the warning. The code has been unchanged since
      the start of git history.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      13f99ebd
  4. Mar 20, 2017
  5. Feb 28, 2017
  6. Feb 27, 2017
  7. Feb 25, 2017
  8. Feb 21, 2017
    • 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 = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      expression e1;
      @@
      snd_ctl_new1(&i@p,e1)
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct snd_kcontrol_new i;
      
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f3b827e0
  9. Feb 19, 2017
  10. Feb 16, 2017
  11. Feb 15, 2017
  12. Feb 14, 2017
  13. Feb 09, 2017
  14. Jan 26, 2017
    • Bhumika Goyal's avatar
      ALSA: cs46xx: constify snd_pcm_ops structures · a6f9dec2
      Bhumika Goyal authored
      
      
      Declare snd_pcm_ops structures as const as they are either stored in the
      ops field of a snd_pcm_substream structure or passed as an argument to
      the function snd_pcm_set_ops. The function argument and the ops field
      are of type const, so snd_pcm_ops structures having this property
      can be made const too.
      
      File size before: sound/pci/cs46xx/cs46xx_lib.o
         text	   data	    bss	    dec	    hex	filename
        26047	   5304	     16	  31367	   7a87	sound/pci/cs46xx/cs46xx_lib.o
      
      File size after: sound/pci/cs46xx/cs46xx_lib.o
         text	   data	    bss	    dec	    hex	filename
        27335	   4036	     16	  31387	   7a9b	sound/pci/cs46xx/cs46xx_lib.o
      
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a6f9dec2
  15. Jan 18, 2017
  16. Jan 16, 2017
  17. Jan 15, 2017
    • Takashi Iwai's avatar
      ALSA: hda - Make single_cmd option to stop the fallback mechanism · 41438f13
      Takashi Iwai authored
      
      
      HD-audio driver has a mechanism to fall back to the single cmd mode as
      a last resort if the CORB/RIRB communication goes wrong even after
      switching to the polling mode.  The switching has worked in the past
      well, but Enrico Mioso reported that his system crashes when this
      happens.
      
      Although the actual cause of the crash isn't still fully analyzed yet,
      it'd be in anyway good to provide an option to turn off the fallback
      mode.  Now this patch extends the behavior of the existing single_cmd
      option for that.  Namely,
      
      - The option is changed from bool to bint.
      - As default, it is the mode allowing the fallback to single cmd.
      - Once when either true/false value is given to the option, the driver
        explicitly turns on/off the single cmd mode, but without the
        fallback.
      
      That is, if you want to disable the fallback, just pass single_cmd=0
      option.  Passing single_cmd=1 will keep working like before.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      41438f13
  18. Jan 12, 2017
  19. Jan 11, 2017
    • Arnd Bergmann's avatar
      ALSA: hda/ca0132 - fix possible NULL pointer use · 46a049da
      Arnd Bergmann authored
      
      
      gcc-7 caught what it considers a NULL pointer dereference:
      
      sound/pci/hda/patch_ca0132.c: In function 'dspio_scp.constprop':
      sound/pci/hda/patch_ca0132.c:1487:4: error: argument 1 null where non-null expected [-Werror=nonnull]
      
      This is plausible from looking at the function, as we compare 'reply'
      to NULL earlier in it. I have not tried to analyze if there are constraints
      that make it impossible to hit the bug, but adding another NULL check in
      the end kills the warning and makes the function more robust.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      46a049da
  20. Jan 04, 2017
Loading