* [PATCH] dmaengine: sf-pdma: apply proper spinlock flags in sf_pdma_prep_dma_memcpy()
@ 2021-06-11 6:53 Austin Kim
2021-06-16 10:40 ` Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: Austin Kim @ 2021-06-11 6:53 UTC (permalink / raw)
To: green.wan, vkoul; +Cc: dmaengine, linux-kernel, austindh.kim, austin.kim
From: Austin Kim <austin.kim@lge.com>
The second parameter of spinlock_irq[save/restore] function is flags,
which is the last input parameter of sf_pdma_prep_dma_memcpy().
So declare local variable 'iflags' to be used as the second parameter of
spinlock_irq[save/restore] function.
Signed-off-by: Austin Kim <austin.kim@lge.com>
---
drivers/dma/sf-pdma/sf-pdma.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
index c4c4e8575764..f12606aeff87 100644
--- a/drivers/dma/sf-pdma/sf-pdma.c
+++ b/drivers/dma/sf-pdma/sf-pdma.c
@@ -94,6 +94,7 @@ sf_pdma_prep_dma_memcpy(struct dma_chan *dchan, dma_addr_t dest, dma_addr_t src,
{
struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);
struct sf_pdma_desc *desc;
+ unsigned long iflags;
if (chan && (!len || !dest || !src)) {
dev_err(chan->pdma->dma_dev.dev,
@@ -109,10 +110,10 @@ sf_pdma_prep_dma_memcpy(struct dma_chan *dchan, dma_addr_t dest, dma_addr_t src,
desc->dirn = DMA_MEM_TO_MEM;
desc->async_tx = vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
- spin_lock_irqsave(&chan->vchan.lock, flags);
+ spin_lock_irqsave(&chan->vchan.lock, iflags);
chan->desc = desc;
sf_pdma_fill_desc(desc, dest, src, len);
- spin_unlock_irqrestore(&chan->vchan.lock, flags);
+ spin_unlock_irqrestore(&chan->vchan.lock, iflags);
return desc->async_tx;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: sf-pdma: apply proper spinlock flags in sf_pdma_prep_dma_memcpy()
2021-06-11 6:53 [PATCH] dmaengine: sf-pdma: apply proper spinlock flags in sf_pdma_prep_dma_memcpy() Austin Kim
@ 2021-06-16 10:40 ` Vinod Koul
2021-06-16 10:56 ` Austin Kim
0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2021-06-16 10:40 UTC (permalink / raw)
To: Austin Kim; +Cc: green.wan, dmaengine, linux-kernel, austin.kim
On 11-06-21, 07:53, Austin Kim wrote:
> From: Austin Kim <austin.kim@lge.com>
>
> The second parameter of spinlock_irq[save/restore] function is flags,
> which is the last input parameter of sf_pdma_prep_dma_memcpy().
>
> So declare local variable 'iflags' to be used as the second parameter of
> spinlock_irq[save/restore] function.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: sf-pdma: apply proper spinlock flags in sf_pdma_prep_dma_memcpy()
2021-06-16 10:40 ` Vinod Koul
@ 2021-06-16 10:56 ` Austin Kim
0 siblings, 0 replies; 3+ messages in thread
From: Austin Kim @ 2021-06-16 10:56 UTC (permalink / raw)
To: Vinod Koul
Cc: green.wan, dmaengine, Linux Kernel Mailing List,
김동현
2021년 6월 16일 (수) 오후 7:40, Vinod Koul <vkoul@kernel.org>님이 작성:
>
> On 11-06-21, 07:53, Austin Kim wrote:
> > From: Austin Kim <austin.kim@lge.com>
> >
> > The second parameter of spinlock_irq[save/restore] function is flags,
> > which is the last input parameter of sf_pdma_prep_dma_memcpy().
> >
> > So declare local variable 'iflags' to be used as the second parameter of
> > spinlock_irq[save/restore] function.
>
> Applied, thanks
Great, thanks!
>
> --
> ~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-16 10:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 6:53 [PATCH] dmaengine: sf-pdma: apply proper spinlock flags in sf_pdma_prep_dma_memcpy() Austin Kim
2021-06-16 10:40 ` Vinod Koul
2021-06-16 10:56 ` Austin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).