Linux-OMAP Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] ARM: OMAP: Use DEFINE_SPINLOCK() for spinlock
@ 2021-03-27  9:52 Chen Lifu
  2021-03-31  5:59 ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Lifu @ 2021-03-27  9:52 UTC (permalink / raw)
  To: chenlifu, Aaro Koskinen, Tony Lindgren, Russell King
  Cc: heying24, yuehaibing, weiyongjun1, johnny.chenyi,
	linux-arm-kernel, linux-kernel, linux-omap, kernel-janitors

From: Lifu Chen <chenlifu@huawei.com>

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lifu Chen <chenlifu@huawei.com>
---
 arch/arm/plat-omap/dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 1eb59003bdec..9f11de46aaa9 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -85,7 +85,7 @@ static int dma_lch_count;
 static int dma_chan_count;
 static int omap_dma_reserve_channels;
 
-static spinlock_t dma_chan_lock;
+static DEFINE_SPINLOCK(dma_chan_lock);
 static struct omap_dma_lch *dma_chan;
 
 static inline void disable_lnk(int lch);
@@ -902,7 +902,6 @@ static int omap_system_dma_probe(struct platform_device *pdev)
 	if (!dma_chan)
 		return -ENOMEM;
 
-	spin_lock_init(&dma_chan_lock);
 	for (ch = 0; ch < dma_chan_count; ch++) {
 		omap_clear_dma(ch);
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] ARM: OMAP: Use DEFINE_SPINLOCK() for spinlock
  2021-03-27  9:52 [PATCH -next] ARM: OMAP: Use DEFINE_SPINLOCK() for spinlock Chen Lifu
@ 2021-03-31  5:59 ` Tony Lindgren
  2021-03-31  9:03   ` chenlifu
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2021-03-31  5:59 UTC (permalink / raw)
  To: Chen Lifu
  Cc: Aaro Koskinen, Russell King, heying24, yuehaibing, weiyongjun1,
	johnny.chenyi, linux-arm-kernel, linux-kernel, linux-omap,
	kernel-janitors

* Chen Lifu <chenlifu@huawei.com> [210327 11:53]:
> From: Lifu Chen <chenlifu@huawei.com>
> 
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().

Thanks applying into omap-for-v5.13/soc.

Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] ARM: OMAP: Use DEFINE_SPINLOCK() for spinlock
  2021-03-31  5:59 ` Tony Lindgren
@ 2021-03-31  9:03   ` chenlifu
  0 siblings, 0 replies; 3+ messages in thread
From: chenlifu @ 2021-03-31  9:03 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Aaro Koskinen, Russell King, heying24, yuehaibing, weiyongjun1,
	johnny.chenyi, linux-arm-kernel, linux-kernel, linux-omap,
	kernel-janitors


在 2021/3/31 13:59, Tony Lindgren 写道:
> * Chen Lifu <chenlifu@huawei.com> [210327 11:53]:
>> From: Lifu Chen <chenlifu@huawei.com>
>>
>> spinlock can be initialized automatically with DEFINE_SPINLOCK()
>> rather than explicitly calling spin_lock_init().
> 
> Thanks applying into omap-for-v5.13/soc.
> 
> Tony
> .
> 

Thanks!

---
Chen Lifu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27  9:52 [PATCH -next] ARM: OMAP: Use DEFINE_SPINLOCK() for spinlock Chen Lifu
2021-03-31  5:59 ` Tony Lindgren
2021-03-31  9:03   ` chenlifu

Linux-OMAP Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-omap/0 linux-omap/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-omap linux-omap/ https://lore.kernel.org/linux-omap \
		linux-omap@vger.kernel.org
	public-inbox-index linux-omap

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-omap


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git