RE: [PATCH 1/2] dmaengine: fsl-edma: Add lockdep assert for exported function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020/06/11 20:18 Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
> Add lockdep assert for an exported function expected to be called under spin
> lock.  Since this function is called in different modules, the lockdep assert will
> be self-documenting note about need for locking.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Reviewed-by: Robin Gong <yibin.gong@xxxxxxx> 
> ---
>  drivers/dma/fsl-edma-common.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/dma/fsl-edma-common.c
> b/drivers/dma/fsl-edma-common.c index 5697c3622699..4550818cca4a
> 100644
> --- a/drivers/dma/fsl-edma-common.c
> +++ b/drivers/dma/fsl-edma-common.c
> @@ -589,6 +589,8 @@ void fsl_edma_xfer_desc(struct fsl_edma_chan
> *fsl_chan)  {
>  	struct virt_dma_desc *vdesc;
> 
> +	lockdep_assert_held(&fsl_chan->vchan.lock);
> +
>  	vdesc = vchan_next_desc(&fsl_chan->vchan);
>  	if (!vdesc)
>  		return;
> --
> 2.7.4





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux