]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/arm-smmu-v3: Use the new rb tree helpers
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 6 Aug 2024 23:31:15 +0000 (20:31 -0300)
committerWill Deacon <will@kernel.org>
Fri, 6 Sep 2024 13:23:49 +0000 (14:23 +0100)
commita2bb820e862d61f9ca1499e500915f9f505a2655
tree11d6db3dde4c498d73624c9268e3edfc4478c763
parent483e0bd8883a40fd3dd3193997a4014337698d72
iommu/arm-smmu-v3: Use the new rb tree helpers

Since v5.12 the rbtree has gained some simplifying helpers aimed at making
rb tree users write less convoluted boiler plate code. Instead the caller
provides a single comparison function and the helpers generate the prior
open-coded stuff.

Update smmu->streams to use rb_find_add() and rb_find().

Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/1-v3-9fef8cdc2ff6+150d1-smmuv3_tidy_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c