Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdafe0cc authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman
Browse files

dmaengine: pl330: rename _start to prevent build error



[ Upstream commit a1a5f2c887252dec161c1e12e04303ca9ba56fa9 ]

"_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 "pl330_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: b7d861d9 ("DMA: PL330: Merge PL330 driver into drivers/dma/")
Fixes: ae43b328 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12")
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Cc: Jaswinder Singh <jassisinghbrar@gmail.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
Link: https://lore.kernel.org/r/20230524045310.27923-1-rdunlap@infradead.org


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b48f6963
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1042,7 +1042,7 @@ static bool _trigger(struct pl330_thread *thrd)
	return true;
}

static bool _start(struct pl330_thread *thrd)
static bool pl330_start_thread(struct pl330_thread *thrd)
{
	switch (_state(thrd)) {
	case PL330_STATE_FAULT_COMPLETING:
@@ -1690,7 +1690,7 @@ static int pl330_update(struct pl330_dmac *pl330)
			thrd->req_running = -1;

			/* Get going again ASAP */
			_start(thrd);
			pl330_start_thread(thrd);

			/* For now, just make a list of callbacks to be done */
			list_add_tail(&descdone->rqd, &pl330->req_done);
@@ -2076,7 +2076,7 @@ static void pl330_tasklet(unsigned long data)
	} else {
		/* Make sure the PL330 Channel thread is active */
		spin_lock(&pch->thread->dmac->lock);
		_start(pch->thread);
		pl330_start_thread(pch->thread);
		spin_unlock(&pch->thread->dmac->lock);
	}

@@ -2094,7 +2094,7 @@ static void pl330_tasklet(unsigned long data)
			if (power_down) {
				pch->active = true;
				spin_lock(&pch->thread->dmac->lock);
				_start(pch->thread);
				pl330_start_thread(pch->thread);
				spin_unlock(&pch->thread->dmac->lock);
				power_down = false;
			}