1. 06 Mar, 2017 6 commits
  2. 02 Mar, 2017 1 commit
  3. 12 Feb, 2017 1 commit
  4. 09 Feb, 2017 1 commit
  5. 05 Feb, 2017 1 commit
  6. 31 Jan, 2017 2 commits
  7. 10 Jan, 2017 1 commit
  8. 23 Nov, 2016 14 commits
  9. 21 Nov, 2016 10 commits
  10. 07 Nov, 2016 1 commit
  11. 02 Oct, 2016 1 commit
    • Bhumika Goyal's avatar
      Staging: speakup: constify attribute_group structures · c4610f6e
      Bhumika Goyal authored
      
      
      Check for attribute_group structures that are only passed as a second
      argument to the functions sysfs_remove_group and sysfs_create_group. As
      these arguments are constant so, attribute_group structures having this
      property  can also be made constant.
      Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      expression e1;
      @@
      (
      sysfs_remove_group(e1,&i@p)
      |
      sysfs_create_group(e1,&i@p)
      )
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         7551	   1440	     16	   9007	   232f
      drivers/staging/speakup/kobjects.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         7671	   1312	     16	   8999	   2327
      drivers/staging/speakup/kobjects.o
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Acked-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c4610f6e
  12. 22 Sep, 2016 1 commit