dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Thu, 7 Oct 2021 11:12:28 +0000 (14:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 13:04:23 +0000 (14:04 +0100)
commit91e43a8500f40108c82e9c82d84571b638529f15
tree4fe541df7e2e96b993044c0b77a0ab873be2f758
parent038dfd67d375b10c9dc6d67dd4db3f1e1e45ce5c
dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro

[ Upstream commit 320c88a3104dc955f928a1eecebd551ff89530c0 ]

AT_XDMAC_CC_PERID() should be used to setup bits 24..30 of XDMAC_CC
register. Using it without parenthesis around 0x7f & (i) will lead to
setting all the time zero for bits 24..30 of XDMAC_CC as the << operator
has higher precedence over bitwise &. Thus, add paranthesis around
0x7f & (i).

Fixes: 15a03850ab8f ("dmaengine: at_xdmac: fix macro typo")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20211007111230.2331837-3-claudiu.beznea@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/at_xdmac.c