]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:44:07 +0000 (09:44 +0200)
commit3dc33f145a8af9c7a3fb98259fa9dcc105dbe1b4
tree24f5e0010c2d303a99cfe993a3dfa68faae908a1
parent8f2451ebaf5b8adffdbdf2ee42e4adf94d213aec
iommu/arm-smmu-v3: Use the new rb tree helpers

[ Upstream commit a2bb820e862d61f9ca1499e500915f9f505a2655 ]

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>
Stable-dep-of: b00d24997a11 ("iommu/arm-smmu-v3: Fix iommu_device_probe bug due to duplicated stream ids")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c