dmascc: use proper 'virt_to_bus()' rather than casting to 'int'
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 19 Sep 2021 17:49:42 +0000 (10:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 19 Sep 2021 17:49:42 +0000 (10:49 -0700)
commitbc1abb9e55cedaeac4602426f8fc83fb3a5b1c35
tree66971aeeb461400be07bfefd87efaad77950bcbd
parent4fef6115903afed5a7f21b387ad132b4c8838bc7
dmascc: use proper 'virt_to_bus()' rather than casting to 'int'

The old dmascc driver depends on the legacy ISA_DMA_API, and blindly
just casts the kernel virtual address to 'int' for set_dma_addr().

That works only incidentally, and because the high bits of the address
will be ignored anyway. And on 64-bit architectures it causes warnings.

Admittedly, 64-bit architectures with ISA are basically dead - I think
the only example of this is alpha, and nobody would ever use the dmascc
driver there.  But hey, the fix is easy enough, the end result is
cleaner, and it's yet another configuration that now builds without
warnings.

If somebody actually uses this driver on an alpha and this fixes it for
you, please email me.  Because that is just incredibly bizarre.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/hamradio/dmascc.c