1. 15 10月, 2011 10 次提交
  2. 08 10月, 2011 14 次提交
  3. 19 8月, 2011 4 次提交
    • J
      drivers/ata/sata_dwc_460ex.c: add missing kfree · a081da63
      Julia Lawall 提交于
      Currently, error handling code in this function calls the function
      sata_dwc_port_stop, but this function has essentially no effect if hsdevp
      has not been stored in ap, which is the case throughout this function.  The
      only effect is to print a debugging message including ap->print_id.
      
      The code is rewritten to not call sata_dwc_port_stop, but instead to jump
      to a local label that prints the original error message and the print_id
      information.  In the case where hsdevp has been already allocated (but not
      yet stored in ap), this value is freed as well.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @exists@
      local idexpression x;
      statement S,S1;
      expression E;
      identifier fl;
      expression *ptr != NULL;
      @@
      
      x = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...kfree(x)...+> }
           when any
           when != true x == NULL
      x->fl
      ...>
      (
      if (x == NULL) S1
      |
      if (...) { ... when != x
                     when forall
      (
       return \(0\|<+...x...+>\|ptr\);
      |
      * return ...;
      )
      }
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      a081da63
    • A
      ata: Add iMX pata support · e39c75cf
      Arnaud Patard (Rtp) 提交于
      Add basic support for pata on iMX. It has been tested only on imx51.
      SDMA support will probably be added later so this version supports only
      PIO.
      
      v2:
        - enable only when needed IORDY
        - use dev_get_drvdata
      v3:
        - add missing clk_put() calls
        - use platform_get_irq()
        - fix resume code to avoid disabling IORDY on resume
      v4:
        - Remove EXPERIMENTAL and switch to depends on ARCH_MXC
        - Use devm_kzalloc()
        - make clock a must-have
        - Use only 1 ioremap
      Signed-off-by: NArnaud Patard <arnaud.patard@rtp-net.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      e39c75cf
    • T
      pata_via: disable ATAPI DMA on AVERATEC 3200 · 6d0e194d
      Tejun Heo 提交于
      On AVERATEC 3200, pata_via causes memory corruption with ATAPI DMA,
      which often leads to random kernel oops.  The cause of the problem is
      not well understood yet and only small subset of machines using the
      controller seem affected.  Blacklist ATAPI DMA on the machine.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=11426Reported-and-tested-by: NJim Bray <jimsantelmo@gmail.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: stable@kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      6d0e194d
    • J
      [libata] sata_sil: fix used-uninit warning · ebd1699e
      Jeff Garzik 提交于
      Init 'serror' to silence the following warning:
      
      drivers/ata/sata_sil.c: In function ‘sil_interrupt’:
      drivers/ata/sata_sil.c:453:14: warning: ‘serror’ may be used uninitialized in
      this function [-Wuninitialized]
      
      This is not a 'can never happen' but is nonetheless extremely unlikely.
      The easiest and cleanest warning fix is simply to init the var,
      rather than worry about marking the var uninit-ok.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ebd1699e
  4. 26 7月, 2011 1 次提交
  5. 24 7月, 2011 11 次提交