31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 655 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

20 Jan, 2019

1 commit

  • One of the more common cases of allocation size calculations is finding the
    size of a structure that has a zero-sized array at the end, along with memory
    for some number of elements for that array. For example:

    struct foo {
    int stuff;
    void *entry[];
    };

    instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);

    Instead of leaving these open-coded and prone to type mistakes, we can now
    use the new struct_size() helper:

    instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);

    This code was detected with the help of Coccinelle.

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Vinod Koul

    Gustavo A. R. Silva
     

02 Oct, 2018

1 commit

  • Clang warns when implicitly converting from one enumerated type to
    another. Avoid this by using the equivalent value from the expected
    type.

    drivers/dma/timb_dma.c:548:27: warning: implicit conversion from
    enumeration type 'enum dma_transfer_direction' to different enumeration
    type 'enum dma_data_direction' [-Wenum-conversion]
    td_desc->desc_list_len, DMA_MEM_TO_DEV);
    ^~~~~~~~~~~~~~
    1 warning generated.

    Reported-by: Nick Desaulniers
    Signed-off-by: Nathan Chancellor
    Reviewed-by: Nick Desaulniers
    Signed-off-by: Vinod Koul

    Nathan Chancellor
     

11 Dec, 2017

1 commit


08 Aug, 2016

1 commit

  • This is in preperation of moving to a callback that provides results to the
    callback for the transaction. The conversion will maintain current behavior
    and the driver must convert to new callback mechanism at a later time in
    order to receive results.

    Signed-off-by: Dave Jiang
    Reviewed-by: Lars-Peter Clausen
    Signed-off-by: Vinod Koul

    Dave Jiang
     

22 Jun, 2016

1 commit


06 Jul, 2015

1 commit


22 Dec, 2014

1 commit


06 Nov, 2014

1 commit

  • There is no need to init .owner field.

    Based on the patch from Peter Griffin
    "mmc: remove .owner field for drivers using module_platform_driver"

    This patch removes the superflous .owner field for drivers which
    use the module_platform_driver API, as this is overriden in
    platform_driver_register anyway."

    Signed-off-by: Kiran Padwal
    [for nvidia]
    Acked-by: Thierry Reding
    Signed-off-by: Vinod Koul

    Kiran Padwal
     

15 Nov, 2013

1 commit

  • Remove support for DMA unmapping from drivers as it is no longer
    needed (DMA core code is now handling it).

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    [djbw: fix up chan2parent() unused warning in drivers/dma/dw/core.c]
    Signed-off-by: Dan Williams

    Bartlomiej Zolnierkiewicz
     

14 Nov, 2013

1 commit

  • Add a hook for a common dma unmap implementation to enable removal of
    the per driver custom unmap code. (A reworked version of Bartlomiej
    Zolnierkiewicz's patches to remove the custom callbacks and the size
    increase of dma_async_tx_descriptor for drivers that don't care about
    raid).

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    [bzolnier: prepare pl330 driver for adding missing unmap while at it]
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Signed-off-by: Dan Williams

    Dan Williams
     

13 Aug, 2013

1 commit


05 Jul, 2013

1 commit

  • The driver core clears the driver data to NULL after device_release
    or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound).
    Thus, it is not needed to manually clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Signed-off-by: Vinod Koul

    Jingoo Han
     

15 Apr, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitconst,
    and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Viresh Kumar
    Cc: Dan Williams
    Cc: Vinod Koul
    Cc: Barry Song
    Cc: Jeff Kirsher
    Cc: Alexander Duyck
    Cc: Russell King
    Cc: Linus Walleij
    Cc: Jassi Brar
    Cc: Dave Jiang
    Cc: Bill Pemberton
    Cc: Guennadi Liakhovetski
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 Nov, 2012

1 commit

  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Li Yang
    Cc: Zhang Wei
    Cc: Barry Song
    Acked-by: Viresh Kumar
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

21 Mar, 2012

1 commit


13 Mar, 2012

7 commits

  • Fixed trivial issues in drivers:
    drivers/dma/imx-sdma.c
    drivers/dma/intel_mid_dma.c
    drivers/dma/ioat/dma_v3.c
    drivers/dma/iop-adma.c
    drivers/dma/sirf-dma.c
    drivers/dma/timb_dma.c

    Signed-off-by: Vinod Koul

    Vinod Koul
     
  • Provide a common function to initialize a channels cookie values.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Now that we have the completed cookie in the dma_chan structure, we
    can consolidate the tx_status functions by providing a function to set
    the txstate structure and returning the DMA status. We also provide
    a separate helper to set the residue for cookies which are still in
    progress.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Provide a common function to do the cookie mechanics for completing
    a DMA descriptor.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Everyone deals with assigning DMA cookies in the same way (it's part of
    the API so they should be), so lets consolidate the common code into a
    helper function to avoid this duplication.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Add a local private header file to contain definitions and declarations
    which should only be used by DMA engine drivers.

    We also fix linux/dmaengine.h to use LINUX_DMAENGINE_H to guard against
    multiple inclusion.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Every DMA engine implementation declares a last completed dma cookie
    in their private dma channel structures. This is pointless, and
    forces driver specific code. Move this out into the common dma_chan
    structure.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     

05 Dec, 2011

1 commit


28 Nov, 2011

1 commit

  • Sparse warns:

    drivers/dma/timb_dma.c:168:17: warning: mixing different enum types
    drivers/dma/timb_dma.c:168:17: int enum dma_transfer_direction versus
    drivers/dma/timb_dma.c:168:17: int enum dma_data_direction
    drivers/dma/timb_dma.c:172:32: warning: mixing different enum types
    drivers/dma/timb_dma.c:172:32: int enum dma_transfer_direction versus
    drivers/dma/timb_dma.c:172:32: int enum dma_data_direction

    Reported-by: Dan Carpenter
    Signed-off-by: Vinod Koul

    Vinod Koul
     

27 Oct, 2011

1 commit

  • fixup usage of dma direction by introducing dma_transfer_direction,
    this patch moves dma/drivers/* to use new enum

    Cc: Jassi Brar
    Cc: Russell King
    Cc: Viresh Kumar
    Cc: Linus Walleij
    Cc: Nicolas Ferre
    Cc: Mika Westerberg
    Cc: H Hartley Sweeten
    Cc: Li Yang
    Cc: Zhang Wei
    Cc: Sascha Hauer
    Cc: Guennadi Liakhovetski
    Cc: Shawn Guo
    Cc: Yong Wang
    Cc: Tomoya MORINAGA
    Cc: Boojin Kim
    Cc: Barry Song
    Acked-by: Mika Westerberg
    Acked-by: Linus Walleij
    Acked-by: Viresh Kumar
    Acked-by: Nicolas Ferre
    Signed-off-by: Vinod Koul

    Vinod Koul
     

07 Oct, 2011

1 commit


20 Sep, 2011

1 commit


27 May, 2011

1 commit


23 Mar, 2011

1 commit

  • The cell's platform_data is now accessed with a helper function;
    change clients to use that, and remove the now-unused data_size.

    Note that the mfd's platform_data is marked __devinitdata. This
    is still correct in all cases except for the timbgpio driver, whose
    remove hook has been changed to no longer reference the pdata.

    Signed-off-by: Andres Salomon
    Signed-off-by: Samuel Ortiz

    Andres Salomon
     

01 Mar, 2011

1 commit


20 Oct, 2010

1 commit


01 Jul, 2010

2 commits

  • If td_desc is NULL, just skip both kfrees.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @r exists@
    expression E,E1;
    identifier f;
    statement S1,S2,S3;
    @@

    if ((E == NULL && ...) || ...)
    {
    ... when != if (...) S1 else S2
    when != E = E1
    * E->f
    ... when any
    return ...;
    }
    else S3
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Dan Williams

    Julia Lawall
     
  • This silences a compile warning on 32 bit systems:
    drivers/dma/timb_dma.c:203: warning: cast to pointer from integer of different size

    Signed-off-by: Dan Carpenter
    Signed-off-by: Dan Williams

    Dan Carpenter
     

25 May, 2010

1 commit


18 May, 2010

1 commit

  • This adds an argument to the DMAengine control function, so that
    we can later provide control commands that need some external data
    passed in through an argument akin to the ioctl() operation
    prototype.

    [dan.j.williams@intel.com: fix up some missed conversions]
    Signed-off-by: Linus Walleij
    Signed-off-by: Dan Williams

    Linus Walleij
     

30 Mar, 2010

1 commit


27 Mar, 2010

2 commits

  • Simple conditional struct filler to cut out some duplicated code.

    Signed-off-by: Dan Williams

    Dan Williams
     
  • Convert the device_is_tx_complete() operation on the
    DMA engine to a generic device_tx_status()operation which
    can return three states, DMA_TX_RUNNING, DMA_TX_COMPLETE,
    DMA_TX_PAUSED.

    [dan.j.williams@intel.com: update for timberdale]
    Signed-off-by: Linus Walleij
    Acked-by: Mark Brown
    Cc: Maciej Sosnowski
    Cc: Nicolas Ferre
    Cc: Pavel Machek
    Cc: Li Yang
    Cc: Guennadi Liakhovetski
    Cc: Paul Mundt
    Cc: Ralf Baechle
    Cc: Haavard Skinnemoen
    Cc: Magnus Damm
    Cc: Liam Girdwood
    Cc: Joe Perches
    Cc: Roland Dreier
    Signed-off-by: Dan Williams

    Linus Walleij