Skip to content
  1. Mar 01, 2017
  2. Feb 28, 2017
  3. Feb 22, 2017
    • Bhumika Goyal's avatar
      ALSA: usb-audio: constify snd_kcontrol_new structures · 04bab350
      Bhumika Goyal authored
      
      
      Declare snd_kcontrol_new structures as const as they are only passed as
      an argument to the function add_new_ctl. This agrument is of type const,
      so snd_kcontrol_new structures having this property can be made const
      too.
      
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      04bab350
    • 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
  4. Feb 21, 2017
  5. Feb 20, 2017
  6. Feb 17, 2017