1. 07 Oct, 2018 1 commit
  2. 08 Nov, 2017 1 commit
  3. 30 Sep, 2016 1 commit
  4. 26 Sep, 2016 3 commits
    • Vinod Koul's avatar
      dmaengine: coh901318: fix pointer cast warnings · c021d835
      Vinod Koul authored
      On some systems, pointer can be large than unsigned int, triggering warning
      pointer-to-int-cast on conversion.
      
      drivers/dma/coh901318.c: In function 'coh901318_filter_id':
      drivers/dma/coh901318.c:1769:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        unsigned int ch_nr = (unsigned int) chan_id;
      
      Also, converting an iomem pointer for print leads to warn on some system
      which can be avoided with %p specfier
      
      drivers/dma/coh901318.c: In function 'coh901318_probe':
      drivers/dma/coh901318.c:2748:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
         (u32) base->virtbase);
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      c021d835
    • Vinod Koul's avatar
      dmaengine: coh901318: return ssize_t for coh901318_debugfs_read · 66a1a512
      Vinod Koul authored
      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: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      66a1a512
    • Vinod Koul's avatar
      dmaengine: coh901318: use correct print specifiers · 3fd38662
      Vinod Koul authored
      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: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      3fd38662
  5. 14 Sep, 2016 1 commit
  6. 08 Aug, 2016 1 commit
  7. 23 Jul, 2016 1 commit
  8. 16 Jul, 2016 3 commits
  9. 21 Jun, 2016 1 commit
  10. 05 Aug, 2015 1 commit
  11. 18 Jan, 2015 1 commit
    • Arnd Bergmann's avatar
      dmaengine: coh901318: fix function return types build warnings · 4d76bbed
      Arnd Bergmann authored
      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: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 6782af11 ("dmaengine: coh901318: Split device_control")
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      4d76bbed
  12. 22 Dec, 2014 1 commit
  13. 15 Oct, 2014 1 commit
  14. 25 Oct, 2013 1 commit
  15. 13 Oct, 2013 1 commit
  16. 04 Sep, 2013 1 commit
  17. 17 Jun, 2013 1 commit
  18. 15 Apr, 2013 1 commit
  19. 14 Feb, 2013 1 commit
  20. 07 Jan, 2013 8 commits
  21. 14 Jun, 2012 1 commit
  22. 11 May, 2012 1 commit
    • Lars-Peter Clausen's avatar
      dmaengine: Use dma_sg_len(sg) instead of sg->length · fdaf9c4b
      Lars-Peter Clausen authored
      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: default avatarLars-Peter Clausen <lars@metafoo.de>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
      fdaf9c4b
  23. 05 Apr, 2012 1 commit
    • Stephen Boyd's avatar
      simple_open: automatically convert to simple_open() · 234e3405
      Stephen Boyd authored
      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: default avatarStephen 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: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      234e3405
  24. 21 Mar, 2012 1 commit
  25. 13 Mar, 2012 5 commits