[PATCH v3 1/9] iommu/arm-smmu-v3: Use the new rb tree helpers

Will Deacon will at kernel.org
Fri Sep 6 06:23:02 PDT 2024


On Tue, Aug 06, 2024 at 08:31:15PM -0300, Jason Gunthorpe wrote:
> 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 at nvidia.com>
> Reviewed-by: Mostafa Saleh <smostafa at google.com>
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 68 ++++++++++-----------
>  1 file changed, 31 insertions(+), 37 deletions(-)

Thanks, this is a lot better! I'll pick this one up.

Will



More information about the linux-arm-kernel mailing list