1. 10 12月, 2008 25 次提交
  2. 03 12月, 2008 1 次提交
  3. 02 12月, 2008 1 次提交
    • J
      [MTD] [NAND] drivers/mtd/nand/pasemi_nand.c: Add missing pci_dev_put · d9476298
      Julia Lawall 提交于
      pci_get_device increments a reference count that should be decremented
      using pci_dev_put.
      
      The semantic patch that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S,S1;
      position p1,p2,p3;
      expression E,E1;
      type T,T1;
      expression *ptr != NULL;
      @@
      
      (
       if ((x@p1 = pci_get_device(...)) == NULL) S
      |
       x@p1 = pci_get_device(...);
      )
       ... when != pci_dev_put(...,(T)x,...)
           when != if (...) { <+... pci_dev_put(...,(T)x,...) ...+> }
           when != true x == NULL || ...
           when != x = E
           when != E = (T)x
           when any
      (
       if (x == NULL || ...) S1
      |
       if@p2 (...) {
        ... when != pci_dev_put(...,(T1)x,...)
            when != if (...) { <+... pci_dev_put(...,(T1)x,...) ...+> }
            when != x = E1
            when != E1 = (T1)x
      (
        return \(0\|<+...x...+>\|ptr\);
      |
        return@p3 ...;
      )
      }
      )
      
      @ script:python @
      p1 << r.p1;
      p3 << r.p3;
      @@
      
      print "* file: %s pci_get_device: %s return: %s" % (p1[0].file,p1[0].line,p3[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      d9476298
  4. 27 11月, 2008 1 次提交
  5. 26 11月, 2008 5 次提交
  6. 24 11月, 2008 1 次提交
  7. 13 11月, 2008 2 次提交
  8. 06 11月, 2008 2 次提交
  9. 05 11月, 2008 2 次提交
    • E
      [MTD] [NOR] Fix cfi_send_gen_cmd handling of x16 devices in x8 mode (v4) · 467622ef
      Eric W. Biederman 提交于
      For "unlock" cycles to 16bit devices in 8bit compatibility mode we need
      to use the byte addresses 0xaaa and 0x555. These effectively match
      the word address 0x555 and 0x2aa, except the latter has its low bit set.
      
      Most chips don't care about the value of the 'A-1' pin in x8 mode,
      but some -- like the ST M29W320D -- do. So we need to be careful to
      set it where appropriate.
      
      cfi_send_gen_cmd is only ever passed addresses where the low byte
      is 0x00, 0x55 or 0xaa. Of those, only addresses ending 0xaa are
      affected by this patch, by masking in the extra low bit when the device
      is known to be in compatibility mode.
      
      [dwmw2: Do it only when (cmd_ofs & 0xff) == 0xaa]
      v4: Fix  stupid typo in cfi_build_cmd_addr that failed to compile
          I'm writing this patch way to late at night.
      v3: Bring all of the work back into cfi_build_cmd_addr
          including calling of map_bankwidth(map) and cfi_interleave(cfi)
          So every caller doesn't need to.
      v2: Only modified the address if we our device_type is larger than our
          bus width.
      
      Cc: stable@kernel.org
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      467622ef
    • J
      drivers: remove duplicated #include · 54074d59
      Jianjun Kong 提交于
      Signed-off-by: NJianjun Kong <jianjun@zeuux.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      54074d59