From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B6881C6FF5; Thu, 24 Jul 2025 07:52:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753343566; cv=none; b=UakdmFjhcXt++7yUOhemqj1qJdEr/T5v4OTgvLVRpYHqP1zltsHB9VxE8lBkPX7A0KqNKL5WFqg2F/TNO2bsme0SVpKGQozDhF//p67zURnzNBJMIB8+9tldyRi6CASYKbfZfL6B2t7M0C6Ee1hej8YiI3f0Pt7w5VqA5XGcOVY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753343566; c=relaxed/simple; bh=mWKop4D8i0hQlywL0RLEcKxr6x2x6dy8AoH9oKjF3qM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n1rCCD2rS4kQFFA54+d5BXXhvCmLQVpbE6tPcUhfyoduNWrDf8pEJZVu7lMBj6DTWywA2zvtqye7cdwfrtVrMBZF0EYIM+URCcY5cWf/6bhLGTPJx0vWQ5Ldln4Hf28Xru3ScF3U0Zger/bh5F8DmLgcfv0L6P8FdmF/wyZeYqg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 376B168BFE; Thu, 24 Jul 2025 09:52:38 +0200 (CEST) Date: Thu, 24 Jul 2025 09:52:38 +0200 From: Christoph Hellwig To: Leon Romanovsky Cc: Alex Williamson , Leon Romanovsky , Christoph Hellwig , Jason Gunthorpe , Andrew Morton , Bjorn Helgaas , Christian =?iso-8859-1?Q?K=F6nig?= , dri-devel@lists.freedesktop.org, iommu@lists.linux.dev, Jens Axboe , =?iso-8859-1?B?Suly9G1l?= Glisse , Joerg Roedel , kvm@vger.kernel.org, linaro-mm-sig@lists.linaro.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, Logan Gunthorpe , Marek Szyprowski , Robin Murphy , Sumit Semwal , Vivek Kasireddy , Will Deacon Subject: Re: [PATCH 03/10] PCI/P2PDMA: Simplify bus address mapping API Message-ID: <20250724075238.GC30590@lst.de> References: <30640b5e4ec975f928e685b92aaaf3e2e5e08f72.1753274085.git.leonro@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30640b5e4ec975f928e685b92aaaf3e2e5e08f72.1753274085.git.leonro@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Wed, Jul 23, 2025 at 04:00:04PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Update the pci_p2pdma_bus_addr_map() function to take a direct pointer > to the p2pdma_provider structure instead of the pci_p2pdma_map_state. > This simplifies the API by removing the need for callers to extract > the provider from the state structure. > > The change updates all callers across the kernel (block layer, IOMMU, > DMA direct, and HMM) to pass the provider pointer directly, making > the code more explicit and reducing unnecessary indirection. This > also removes the runtime warning check since callers now have direct > control over which provider they use. Again I don't actually see any simplification here. But maybe I'm missing the ultimate goal here.