1. 15 3月, 2010 1 次提交
    • W
      init dynamic bin_attribute structures · f937331b
      Wolfram Sang 提交于
      Commit 6992f533 ("sysfs: Use one lockdep
      class per sysfs attribute.") introduced this requirement.  First, at25
      was fixed manually.  Then, other occurences were found with coccinelle
      and the following semantic patch.  Results were reviewed and fixed up:
      
          @ init @
          identifier struct_name, bin;
          @@
      
          	struct struct_name {
          		...
          		struct bin_attribute bin;
          		...
          	};
      
          @ main extends init @
          expression E;
          statement S;
          identifier name, err;
          @@
      
          (
          	struct struct_name *name;
          |
          -	struct struct_name *name = NULL;
          +	struct struct_name *name;
          )
          	...
          (
          	sysfs_bin_attr_init(&name->bin);
          |
          +	sysfs_bin_attr_init(&name->bin);
          	if (sysfs_create_bin_file(E, &name->bin))
          		S
          |
          +	sysfs_bin_attr_init(&name->bin);
          	err = sysfs_create_bin_file(E, &name->bin);
          )
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f937331b
  2. 27 2月, 2010 1 次提交
  3. 13 1月, 2010 1 次提交
  4. 17 12月, 2009 1 次提交
  5. 14 11月, 2009 1 次提交
  6. 02 11月, 2009 2 次提交
  7. 18 9月, 2009 1 次提交
    • J
      MIPS: TXx9: Fix error handling. · 70ebadc8
      Julia Lawall 提交于
      Error handling code following a kzalloc should free the allocated data.
      Error handling code following an ioremap should iounmap the allocated data.
      
      The semantic match that finds the first problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,f1,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      (
      x->f1 = E
      |
       (x->f1 == NULL || ...)
      |
       f(...,x->f1,...)
      )
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      70ebadc8
  8. 04 8月, 2009 1 次提交
  9. 17 6月, 2009 3 次提交
  10. 21 3月, 2009 1 次提交
  11. 28 10月, 2008 2 次提交
  12. 11 10月, 2008 10 次提交
  13. 06 9月, 2008 1 次提交
  14. 26 8月, 2008 1 次提交
  15. 31 7月, 2008 6 次提交
  16. 20 7月, 2008 3 次提交
  17. 16 7月, 2008 4 次提交