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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2A20CCA47F for ; Fri, 8 Jul 2022 14:53:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237753AbiGHOx4 (ORCPT ); Fri, 8 Jul 2022 10:53:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237623AbiGHOx4 (ORCPT ); Fri, 8 Jul 2022 10:53:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 997682A73D; Fri, 8 Jul 2022 07:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9/lkeRcGIhHu6UVP5xYmV7mYlWFVVjg4XhlUmR+XakU=; b=u/hJU81hiwYxXnG04A+ldFArw5 FTQjbsTDMajhXO2rUfAsuJI5/r3v1zr7iPeLiKDX6NrmpYwS8sf/5S306VLzRoZFaBIwztvkTEkXm eUm4v4oYRwLM561NqYLJA1JF3xrDFVyWq9meyhaNJYzbINN0H+pDxN8ehYUW/hUtRd3BomZ6BuHhx w1GKs/7ZEFQf3u8WfpHzqdV2N1ch2jMDqeEICZKZfgnuXpbopkkQqToE1231YgyyF7abGsJNymMS4 rwxXRjkK5P4E5oT7IseYLrsfKCYMu4F76TCxKwWUCnUBPhXutUNM7GduKN+ZeGdWwcUOKY0ynubE/ IYEil3TQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9pMc-003a34-EH; Fri, 08 Jul 2022 14:53:50 +0000 Date: Fri, 8 Jul 2022 15:53:50 +0100 From: Matthew Wilcox To: ira.weiny@intel.com Cc: Dan Williams , Greg Kroah-Hartman , "Rafael J. Wysocki" , Alison Schofield , Vishal Verma , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH 1/3] xarray: Introduce devm_xa_init() Message-ID: References: <20220705232159.2218958-1-ira.weiny@intel.com> <20220705232159.2218958-2-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220705232159.2218958-2-ira.weiny@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, Jul 05, 2022 at 04:21:57PM -0700, ira.weiny@intel.com wrote: > The main issue I see with this is defining devm_xa_init() in device.h. > This makes sense because a device is required to use the call. However, > I'm worried about if users will find the call there vs including it in > xarray.h? Honestly, I don't want users to find it. This only makes sense if you're already bought in to the devm cult. I worry people will think that they don't need to do anything else; that everything will be magically freed for them, and we'll leak the objects pointed to from the xarray. I don't even like having xa_destroy() in the API, because of exactly this.