Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: zx: fix build warning

Fix build warning that related to PAGE_SIZE. The maximum DMA
length has nothing to do with PAGE_SIZE, just use a fix number
for the definition.

drivers/dma/zx_dma.c: In function 'zx_dma_prep_memcpy':
drivers/dma/zx_dma.c:523:8: warning: division by zero [-Wdiv-by-zero]
drivers/dma/zx_dma.c: In function 'zx_dma_prep_slave_sg':
drivers/dma/zx_dma.c:567:11: warning: division by zero [-Wdiv-by-zero]

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Jun Nie and committed by
Vinod Koul
067fdeb2 156ae092

+1 -1
+1 -1
drivers/dma/zx_dma.c
··· 26 26 27 27 #define DRIVER_NAME "zx-dma" 28 28 #define DMA_ALIGN 4 29 - #define DMA_MAX_SIZE (0x10000 - PAGE_SIZE) 29 + #define DMA_MAX_SIZE (0x10000 - 512) 30 30 #define LLI_BLOCK_SIZE (4 * PAGE_SIZE) 31 31 32 32 #define REG_ZX_SRC_ADDR 0x00