]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: io: fix sparse flood on asm/io.h
authorAlexander Lobakin <alobakin@pm.me>
Sat, 20 Jun 2020 09:34:51 +0000 (09:34 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 25 Jun 2020 08:36:39 +0000 (10:36 +0200)
commit6ad50aff85fab0f2f814c7d8c75c34711a6a7ac7
tree2285ed77c2be6cf543fa04b13b1dc1e106a8669f
parent58665b03b665bb0a726ea351106b9cc53e4e3d09
MIPS: io: fix sparse flood on asm/io.h

MIPS MMIO macros for byteswapping from/to hardware endianness are a bit
tricky because they use cpu_to_le{16,32,64}() in both directions.
This generates a lot of questions from sparse as __le{16,32,64} types
are 'restricted' and direct cast is forbidden in order to prevent messing
up the byteorder.
As MMIO ops are used in almost every single driver, this leads to console
flooding and complicates bug hunting.

We could fix it in a more proper way, i.e. separate from device /
to device byteswap macros and expand __BUILD_MEMORY_*(), but this seems
redundant and will produce code duplication.
Instead, just expand the existing *ioswab*() macros with forced
typecasting to stop floods.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/mach-cavium-octeon/mangle-port.h
arch/mips/include/asm/mach-generic/mangle-port.h
arch/mips/include/asm/mach-ip27/mangle-port.h
arch/mips/include/asm/mach-ip30/mangle-port.h
arch/mips/include/asm/mach-ip32/mangle-port.h
arch/mips/include/asm/mach-tx39xx/mangle-port.h
arch/mips/include/asm/mach-tx49xx/mangle-port.h