OF: Simplify DMA range calculations
authorRobin Murphy <robin.murphy@arm.com>
Fri, 19 Apr 2024 16:54:41 +0000 (17:54 +0100)
committerJoerg Roedel <jroedel@suse.de>
Fri, 26 Apr 2024 10:07:23 +0000 (12:07 +0200)
commitba503cf41c90e173f9421f7882d84b228bada97a
tree61b50d237001d770aee7385fdf1df1d6d8f83d08
parent0c3457926e7e65710f32e02920c7d423417c93a2
OF: Simplify DMA range calculations

Juggling start, end, and size values for a range is somewhat redundant
and a little hard to follow. Consolidate down to just using inclusive
start and end, which saves us worrying about size overflows for full
64-bit ranges (note that passing a potentially-overflowed value through
to arch_setup_dma_ops() is benign for all current implementations, and
this is working towards removing that anyway).

Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/3e0a72fe3d79eae660e4284bb32f2cb39868ccd7.1713523152.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/of/device.c