linux/drivers/dma/dw-edma
Arnd Bergmann 6f4722b1d1 dmaengine: dw-edma: fix endianess confusion
When building with 'make C=1', sparse reports an endianess bug:

drivers/dma/dw-edma/dw-edma-v0-debugfs.c:60:30: warning: cast removes address space of expression
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: warning: incorrect type in argument 1 (different address spaces)
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24:    expected void const volatile [noderef] <asn:2>*addr
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24:    got void *[assigned] ptr
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: warning: incorrect type in argument 1 (different address spaces)
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24:    expected void const volatile [noderef] <asn:2>*addr
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24:    got void *[assigned] ptr
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: warning: incorrect type in argument 1 (different address spaces)
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24:    expected void const volatile [noderef] <asn:2>*addr
drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24:    got void *[assigned] ptr

The current code is clearly wrong, as it passes an endian-swapped word
into a register function where it gets swapped again. Just pass the variables
directly into lower_32_bits()/upper_32_bits().

Fixes: 7e4b8a4fbe ("dmaengine: Add Synopsys eDMA IP version 0 support")
Link: https://lore.kernel.org/lkml/20190617131820.2470686-1-arnd@arndb.de/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Link: https://lore.kernel.org/r/20190722124457.1093886-3-arnd@arndb.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2019-07-22 20:58:15 +05:30
..
Kconfig dmaengine: dw-edma: Fix build error without CONFIG_PCI_MSI 2019-06-12 10:22:02 +05:30
Makefile dmaengine: Add Synopsys eDMA IP PCIe glue-logic 2019-06-10 13:10:39 +05:30
dw-edma-core.c dmaengine: dw-edma: fix semicolon.cocci warnings 2019-06-25 09:59:36 +05:30
dw-edma-core.h dmaengine: dw-edma: fix __iomem type confusion 2019-07-22 20:58:00 +05:30
dw-edma-pcie.c dmaengine: dw-edma: fix __iomem type confusion 2019-07-22 20:58:00 +05:30
dw-edma-v0-core.c dmaengine: dw-edma: fix endianess confusion 2019-07-22 20:58:15 +05:30
dw-edma-v0-core.h
dw-edma-v0-debugfs.c dmaengine: dw-edma: fix __iomem type confusion 2019-07-22 20:58:00 +05:30
dw-edma-v0-debugfs.h dmaengine: Add Synopsys eDMA IP version 0 debugfs support 2019-06-10 13:10:39 +05:30
dw-edma-v0-regs.h