1. 27 9月, 2016 2 次提交
    • V
      dmaengine: coh901318: return ssize_t for coh901318_debugfs_read · 66a1a512
      Vinod Koul 提交于
      The file_operations.read expects return as ssize_t, so update
      coh901318_debugfs_read to return ssize_t to fix the warning:
      
      drivers/dma/coh901318.c:1369:2: warning: initialization from incompatible pointer type [enabled by default]
        .read  = coh901318_debugfs_read,
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      66a1a512
    • V
      dmaengine: coh901318: use correct print specifiers · 3fd38662
      Vinod Koul 提交于
      This driver when compiled on 64 bits gave warnings:
      
      drivers/dma/coh901318.c: In function 'coh901318_list_print':
      warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=]
      warning: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'dma_addr_t' [-Wformat=]
      warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'dma_addr_t' [-Wformat=]
      
      drivers/dma/coh901318.c: In function 'coh901318_prep_memcpy':
      warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
      warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=]
      warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=]
      
      We should use %pad to print 'dma_addr_t' values and %zu to print size_t
      values
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      3fd38662
  2. 23 7月, 2016 1 次提交
  3. 16 7月, 2016 3 次提交
  4. 22 6月, 2016 1 次提交
  5. 05 8月, 2015 1 次提交
  6. 18 1月, 2015 1 次提交
    • A
      dmaengine: coh901318: fix function return types build warnings · 4d76bbed
      Arnd Bergmann 提交于
      A recent patch that removed coh901318_control() replaced it
      with a number of pointers to existing functions, but those
      unfortunately have the wrong return  type and need to be
      changed to return an 'int' with an error value rather than
      a 'void' to avoid these build warnings:
      
      drivers/dma/coh901318.c:2697:32: warning: assignment from incompatible pointer type
        base->dma_slave.device_config = coh901318_dma_set_runtimeconfig;
                                      ^
      drivers/dma/coh901318.c:2698:31: warning: assignment from incompatible pointer type
        base->dma_slave.device_pause = coh901318_pause;
                                     ^
      drivers/dma/coh901318.c:2699:32: warning: assignment from incompatible pointer type
        base->dma_slave.device_resume = coh901318_resume
      
      The coh901318_base_init function has the correct return type
      already, but needs to be marked 'static' to avoid a sparse
      warning about a missing declaration.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 6782af11 ("dmaengine: coh901318: Split device_control")
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      4d76bbed
  7. 22 12月, 2014 1 次提交
  8. 16 10月, 2014 1 次提交
  9. 25 10月, 2013 1 次提交
  10. 13 10月, 2013 1 次提交
  11. 04 9月, 2013 1 次提交
  12. 17 6月, 2013 1 次提交
  13. 15 4月, 2013 1 次提交
  14. 14 2月, 2013 1 次提交
  15. 08 1月, 2013 8 次提交
  16. 14 6月, 2012 1 次提交
  17. 11 5月, 2012 1 次提交
    • L
      dmaengine: Use dma_sg_len(sg) instead of sg->length · fdaf9c4b
      Lars-Peter Clausen 提交于
      sg->length may or may not contain the length of the dma region to transfer,
      depending on the architecture - dma_sg_len(sg) always will though. For the
      architectures which use the drivers modified by this patch it probably is the
      case that sg->length contains the dma transfer length. But to be consistent and
      future proof change them to use dma_sg_len.
      
      To quote Russel King:
      	sg->length is meaningless to something performing DMA.
      
      	In cases where sg_dma_len(sg) and sg->length are the same storage, then
      	there's no problem. But scatterlists _can_ (and one some architectures) do
      	split them - especially when you have an IOMMU which can allow you to
      	combine a scatterlist into fewer entries.
      
      	So, anything using sg->length for the size of a scatterlist's DMA transfer
      	_after_ a call to dma_map_sg() is almost certainly buggy.
      
      The patch has been generated using the following coccinelle patch:
      <smpl>
      @@
      struct scatterlist *sg;
      expression X;
      @@
      -sg[X].length
      +sg_dma_len(&sg[X])
      @@
      struct scatterlist *sg;
      @@
      -sg->length
      +sg_dma_len(sg)
      </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      fdaf9c4b
  18. 06 4月, 2012 1 次提交
    • S
      simple_open: automatically convert to simple_open() · 234e3405
      Stephen Boyd 提交于
      Many users of debugfs copy the implementation of default_open() when
      they want to support a custom read/write function op.  This leads to a
      proliferation of the default_open() implementation across the entire
      tree.
      
      Now that the common implementation has been consolidated into libfs we
      can replace all the users of this function with simple_open().
      
      This replacement was done with the following semantic patch:
      
      <smpl>
      @ open @
      identifier open_f != simple_open;
      identifier i, f;
      @@
      -int open_f(struct inode *i, struct file *f)
      -{
      (
      -if (i->i_private)
      -f->private_data = i->i_private;
      |
      -f->private_data = i->i_private;
      )
      -return 0;
      -}
      
      @ has_open depends on open @
      identifier fops;
      identifier open.open_f;
      @@
      struct file_operations fops = {
      ...
      -.open = open_f,
      +.open = simple_open,
      ...
      };
      </smpl>
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      234e3405
  19. 21 3月, 2012 1 次提交
  20. 13 3月, 2012 6 次提交
  21. 27 10月, 2011 1 次提交
  22. 14 7月, 2011 1 次提交
  23. 22 6月, 2011 1 次提交
    • A
      net: remove mm.h inclusion from netdevice.h · b7f080cf
      Alexey Dobriyan 提交于
      Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).
      
      To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
      definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
      via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h".
      Removal of mm.h from scatterlist.h was tried and was found not feasible
      on most archs, so the link was cutoff earlier.
      
      Hope people are OK with tiny include file.
      
      Note, that mm_types.h is still dragged in, but it is a separate story.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7f080cf
  24. 19 5月, 2011 1 次提交
  25. 31 3月, 2011 1 次提交