summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2017-09-21 16:52:47 +0100
committerJoerg Roedel <jroedel@suse.de>2017-09-27 17:09:58 +0200
commit973f5fbedb0721ab964386a5fe5120998e71580c (patch)
treedcd0cc4b5513ef9b19732b66e1274e0afd5cae43 /drivers/media
parentbb68b2fbfbd643d4407541f9c7a16a2c9b3a57c7 (diff)
iommu/iova: Simplify cached node logic
The logic of __get_cached_rbnode() is a little obtuse, but then __get_prev_node_of_cached_rbnode_or_last_node_and_update_limit_pfn() wouldn't exactly roll off the tongue... Now that we have the invariant that there is always a valid node to start searching downwards from, everything gets a bit easier to follow if we simplify that function to do what it says on the tin and return the cached node (or anchor node as appropriate) directly. In turn, we can then deduplicate the rb_prev() and limit_pfn logic into the main loop itself, further reduce the amount of code under the lock, and generally make the inner workings a bit less subtle. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/media')
0 files changed, 0 insertions, 0 deletions