From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E063DCE7B0D for ; Fri, 6 Sep 2024 13:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sKhVKXuOoSglhJcnoLNqjIxRnpRHjhG4ZoYSYoc4560=; b=eJRf5sWTqVo1/NrVyk/9luUvRq 2mMfAT7RvzKVZc46F38H9hB3HTEkSlfaJkT5Zl15P2rnU9yinCP0qLMcuJ7ct7zInEPUjCK3337uL EKaInvJ+spbHFueJ+ngQ80fcz8aHx/aik9c7jmKjWDX88nWalhAo2w4DrEPNWM1a7BESQcXdzTxSU dCK4857HmgXXJD2jR/kLULTn5JB3xJcxZ+WkWhU103Rz98Rc3YEMIl8sR1h+qJEsB96x7d5wTKKxh bEXv+GvUidbd48YiSAvigXEc7j5GWCawSV29PQP8Ydsr9DUVAiVEHuGSY92Uk5dXZpi9irTru6x+k KBmeKHVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smYwv-0000000CKMr-0pdz; Fri, 06 Sep 2024 13:24:29 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smYvd-0000000CKDB-0jC5 for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2024 13:23:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id ECBC7A44F34; Fri, 6 Sep 2024 13:23:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10E2CC4CEC4; Fri, 6 Sep 2024 13:23:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725628988; bh=0ICkGPaSJ8PKUUlViOl/vnbbRoOfGiaWaGjBsh6isSA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U/Lmn7W1M/zjObjKVUZe9h4XUZrbt12c11W8Tsu7cnogfSwGTY6IF9ItlWEORdE2N YTo97hoRgkfHTQXm9yH2PUwQ20FgaEkY2gaOYDDHrC1whRb2ZzOLpcQwX4vuoph8iI Utdg/Qc/REDNsoqcD8Yotey2KmevgRTUgUPvT1w/5+c0+iQbohjrR0Hl63d4Gk2dGK UYwiEDDBC/iWZr5C92NjsuCqtV2YSCsWffcO/XPWPh6EvTtI8Km6DgeHTLzMeBa7la mYPJTMTybNeLc8Nr0H0Zg+rgIUvvreeNLfpkPVzv7ZY9iHbFLoKjabjc/sPxjTIQnu BK1+5gGrNEp1Q== Date: Fri, 6 Sep 2024 14:23:02 +0100 From: Will Deacon To: Jason Gunthorpe Cc: iommu@lists.linux.dev, Joerg Roedel , linux-arm-kernel@lists.infradead.org, Robin Murphy , Michael Shavit , Nicolin Chen , patches@lists.linux.dev, Ryan Roberts , Mostafa Saleh Subject: Re: [PATCH v3 1/9] iommu/arm-smmu-v3: Use the new rb tree helpers Message-ID: <20240906132302.GE16959@willie-the-truck> References: <0-v3-9fef8cdc2ff6+150d1-smmuv3_tidy_jgg@nvidia.com> <1-v3-9fef8cdc2ff6+150d1-smmuv3_tidy_jgg@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1-v3-9fef8cdc2ff6+150d1-smmuv3_tidy_jgg@nvidia.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_062309_295951_7F64C5AC X-CRM114-Status: UNSURE ( 9.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > Reviewed-by: Mostafa Saleh > Signed-off-by: Jason Gunthorpe > --- > 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