Skip to content

Commit 617b6a8

Browse files
committed
fixup! dmaengine: dw-axi-dmac: Fix alignment checks
Signed-off-by: Phil Elwell <[email protected]>
1 parent fc2c8c5 commit 617b6a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,8 @@ static int dw_axi_dma_set_hw_desc(struct axi_dma_chan *chan,
794794
return -EINVAL;
795795
}
796796

797-
if (len % reg_width) {
798-
dev_err(chan->chip->dev, "length not aligned to device width\n");
797+
if (len % (1 << reg_width)) {
798+
dev_err_ratelimited(chan->chip->dev, "length %ld not aligned to device width %d\n", len, 1 << reg_width);
799799
return -EINVAL;
800800
}
801801

0 commit comments

Comments
 (0)