aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorTudor Ambarus <[email protected]>2022-10-25 12:02:53 +0300
committerVinod Koul <[email protected]>2022-11-11 12:15:08 +0530
commitf5d79afa3a858eb6e5cf2bcd894ed53b5bd8b5ff (patch)
tree702ed36ad9beac0b9f97f8318caa1ef76d7955fc /lib/mpi/mpi-mod.c
parent0e75c28c52962b528947843e947b4bd0c74d40d2 (diff)
dmaengine: at_hdmac: Pass residue by address to avoid unnecessary implicit casts
struct dma_tx_state defines residue as u32. atc_get_bytes_left() returned an int which could be either an error or the value of the residue. This could cause problems if the controller supported a u32 buffer transfer size and the u32 value was past the max int can hold. Our controller does not support u32 buffer transfer size, but even so, improve the code and pass the residue by address to avoid unnecessary implicit casts and make atc_get_bytes_left() return 0 on success or -errno on errors. Signed-off-by: Tudor Ambarus <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions