mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dmaengine: pl330: rename _start to prevent build error
@ 2023-05-23  0:06 Randy Dunlap
  2023-05-23  6:47 ` Conor Dooley
  2023-05-23 14:08 ` Vinod Koul
  0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2023-05-23  0:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Jaswinder Singh, Jaswinder Singh, Boojin Kim,
	Krzysztof Kozlowski, Russell King, Vinod Koul, dmaengine,
	linux-riscv

"_start" is used in several arches and proably should be reserved
for ARCH usage. Using it in a driver for a private symbol can cause
a build error when it conflicts with ARCH usage of the same symbol.

Therefore rename pl330's "_start" to "_start_thread" so that there
is no conflict and no build error.

drivers/dma/pl330.c:1053:13: error: '_start' redeclared as different kind of symbol
 1053 | static bool _start(struct pl330_thread *thrd)
      |             ^~~~~~
In file included from ../include/linux/interrupt.h:21,
                 from ../drivers/dma/pl330.c:18:
arch/riscv/include/asm/sections.h:11:13: note: previous declaration of '_start' with type 'char[]'
   11 | extern char _start[];
      |             ^~~~~~

Fixes: b7d861d93945 ("DMA: PL330: Merge PL330 driver into drivers/dma/")
Fixes: ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jaswinder Singh <jassisinghbrar@gmail.com>
Cc: Jaswinder Singh <jassi.brar@samsung.com>
Cc: Boojin Kim <boojin.kim@samsung.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
---
 drivers/dma/pl330.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -- a/drivers/dma/pl330.c b/drivers/dma/pl330.c
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1050,7 +1050,7 @@ static bool _trigger(struct pl330_thread
 	return true;
 }
 
-static bool _start(struct pl330_thread *thrd)
+static bool _start_thread(struct pl330_thread *thrd)
 {
 	switch (_state(thrd)) {
 	case PL330_STATE_FAULT_COMPLETING:
@@ -1702,7 +1702,7 @@ static int pl330_update(struct pl330_dma
 			thrd->req_running = -1;
 
 			/* Get going again ASAP */
-			_start(thrd);
+			_start_thread(thrd);
 
 			/* For now, just make a list of callbacks to be done */
 			list_add_tail(&descdone->rqd, &pl330->req_done);
@@ -2089,7 +2089,7 @@ static void pl330_tasklet(struct tasklet
 	} else {
 		/* Make sure the PL330 Channel thread is active */
 		spin_lock(&pch->thread->dmac->lock);
-		_start(pch->thread);
+		_start_thread(pch->thread);
 		spin_unlock(&pch->thread->dmac->lock);
 	}
 
@@ -2107,7 +2107,7 @@ static void pl330_tasklet(struct tasklet
 			if (power_down) {
 				pch->active = true;
 				spin_lock(&pch->thread->dmac->lock);
-				_start(pch->thread);
+				_start_thread(pch->thread);
 				spin_unlock(&pch->thread->dmac->lock);
 				power_down = false;
 			}

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

* Re: [PATCH] dmaengine: pl330: rename _start to prevent build error
  2023-05-23  0:06 [PATCH] dmaengine: pl330: rename _start to prevent build error Randy Dunlap
@ 2023-05-23  6:47 ` Conor Dooley
  2023-05-23 14:08 ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2023-05-23  6:47 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Jaswinder Singh, Jaswinder Singh, Boojin Kim,
	Krzysztof Kozlowski, Russell King, Vinod Koul, dmaengine,
	linux-riscv

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

Hey Randy,

On Mon, May 22, 2023 at 05:06:06PM -0700, Randy Dunlap wrote:
> "_start" is used in several arches and proably should be reserved
> for ARCH usage. Using it in a driver for a private symbol can cause
> a build error when it conflicts with ARCH usage of the same symbol.
> 
> Therefore rename pl330's "_start" to "_start_thread" so that there
> is no conflict and no build error.

_start_thread() seems pretty generic to me too, but there don't appear
to be any users & it is certainly better than the one causing build
issues!

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> 
> drivers/dma/pl330.c:1053:13: error: '_start' redeclared as different kind of symbol
>  1053 | static bool _start(struct pl330_thread *thrd)
>       |             ^~~~~~
> In file included from ../include/linux/interrupt.h:21,
>                  from ../drivers/dma/pl330.c:18:
> arch/riscv/include/asm/sections.h:11:13: note: previous declaration of '_start' with type 'char[]'
>    11 | extern char _start[];
>       |             ^~~~~~

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] dmaengine: pl330: rename _start to prevent build error
  2023-05-23  0:06 [PATCH] dmaengine: pl330: rename _start to prevent build error Randy Dunlap
  2023-05-23  6:47 ` Conor Dooley
@ 2023-05-23 14:08 ` Vinod Koul
  2023-05-23 15:20   ` Randy Dunlap
  1 sibling, 1 reply; 4+ messages in thread
From: Vinod Koul @ 2023-05-23 14:08 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Jaswinder Singh, Jaswinder Singh, Boojin Kim,
	Krzysztof Kozlowski, Russell King, dmaengine, linux-riscv

On 22-05-23, 17:06, Randy Dunlap wrote:
> "_start" is used in several arches and proably should be reserved
> for ARCH usage. Using it in a driver for a private symbol can cause
> a build error when it conflicts with ARCH usage of the same symbol.
> 
> Therefore rename pl330's "_start" to "_start_thread" so that there
> is no conflict and no build error.

Why not rename to pl330_start or pl330_start_thread to ensure we will
might not conflict ever!

-- 
~Vinod

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

* Re: [PATCH] dmaengine: pl330: rename _start to prevent build error
  2023-05-23 14:08 ` Vinod Koul
@ 2023-05-23 15:20   ` Randy Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2023-05-23 15:20 UTC (permalink / raw)
  To: Vinod Koul
  Cc: linux-kernel, Jaswinder Singh, Jaswinder Singh, Boojin Kim,
	Krzysztof Kozlowski, Russell King, dmaengine, linux-riscv



On 5/23/23 07:08, Vinod Koul wrote:
> On 22-05-23, 17:06, Randy Dunlap wrote:
>> "_start" is used in several arches and proably should be reserved
>> for ARCH usage. Using it in a driver for a private symbol can cause
>> a build error when it conflicts with ARCH usage of the same symbol.
>>
>> Therefore rename pl330's "_start" to "_start_thread" so that there
>> is no conflict and no build error.
> 
> Why not rename to pl330_start or pl330_start_thread to ensure we will
> might not conflict ever!
> 

Ok, will do. Thanks.

-- 
~Randy

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

end of thread, other threads:[~2023-05-23 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23  0:06 [PATCH] dmaengine: pl330: rename _start to prevent build error Randy Dunlap
2023-05-23  6:47 ` Conor Dooley
2023-05-23 14:08 ` Vinod Koul
2023-05-23 15:20   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®