netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmascc: add CONFIG_VIRT_TO_BUS dependency
@ 2021-09-27 14:15 Arnd Bergmann
  2021-09-28 12:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-09-27 14:15 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski; +Cc: Arnd Bergmann, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Many architectures don't define virt_to_bus() any more, as drivers
should be using the dma-mapping interfaces where possible:

In file included from drivers/net/hamradio/dmascc.c:27:
drivers/net/hamradio/dmascc.c: In function 'tx_on':
drivers/net/hamradio/dmascc.c:976:30: error: implicit declaration of function 'virt_to_bus'; did you mean 'virt_to_fix'? [-Werror=implicit-function-declaration]
  976 |                              virt_to_bus(priv->tx_buf[priv->tx_tail]) + n);
      |                              ^~~~~~~~~~~
arch/arm/include/asm/dma.h:109:52: note: in definition of macro 'set_dma_addr'
  109 |         __set_dma_addr(chan, (void *)__bus_to_virt(addr))
      |                                                    ^~~~

Add the Kconfig dependency to prevent this from being built on
architectures without virt_to_bus().

Fixes: bc1abb9e55ce ("dmascc: use proper 'virt_to_bus()' rather than casting to 'int'")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/hamradio/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig
index f4843f9672c1..441da03c23ee 100644
--- a/drivers/net/hamradio/Kconfig
+++ b/drivers/net/hamradio/Kconfig
@@ -48,6 +48,7 @@ config BPQETHER
 config DMASCC
 	tristate "High-speed (DMA) SCC driver for AX.25"
 	depends on ISA && AX25 && BROKEN_ON_SMP && ISA_DMA_API
+	depends on VIRT_TO_BUS
 	help
 	  This is a driver for high-speed SCC boards, i.e. those supporting
 	  DMA on one port. You usually use those boards to connect your
-- 
2.29.2


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

* Re: [PATCH] dmascc: add CONFIG_VIRT_TO_BUS dependency
  2021-09-27 14:15 [PATCH] dmascc: add CONFIG_VIRT_TO_BUS dependency Arnd Bergmann
@ 2021-09-28 12:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-28 12:20 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: davem, kuba, arnd, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Mon, 27 Sep 2021 16:15:24 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Many architectures don't define virt_to_bus() any more, as drivers
> should be using the dma-mapping interfaces where possible:
> 
> In file included from drivers/net/hamradio/dmascc.c:27:
> drivers/net/hamradio/dmascc.c: In function 'tx_on':
> drivers/net/hamradio/dmascc.c:976:30: error: implicit declaration of function 'virt_to_bus'; did you mean 'virt_to_fix'? [-Werror=implicit-function-declaration]
>   976 |                              virt_to_bus(priv->tx_buf[priv->tx_tail]) + n);
>       |                              ^~~~~~~~~~~
> arch/arm/include/asm/dma.h:109:52: note: in definition of macro 'set_dma_addr'
>   109 |         __set_dma_addr(chan, (void *)__bus_to_virt(addr))
>       |                                                    ^~~~
> 
> [...]

Here is the summary with links:
  - dmascc: add CONFIG_VIRT_TO_BUS dependency
    https://git.kernel.org/netdev/net/c/05e97b3d33cb

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-09-28 12:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-27 14:15 [PATCH] dmascc: add CONFIG_VIRT_TO_BUS dependency Arnd Bergmann
2021-09-28 12:20 ` patchwork-bot+netdevbpf

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).