Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp590347imw; Fri, 8 Jul 2022 08:13:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tZWoT5ftt87yyEHnCbzwsSiidN79Uj/7S+rg3jm/9BJeb5HnJxJxSRP0pgwJX25Lyr5eKW X-Received: by 2002:a05:6a00:3498:b0:525:448a:de0 with SMTP id cp24-20020a056a00349800b00525448a0de0mr4264921pfb.85.1657293239494; Fri, 08 Jul 2022 08:13:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657293239; cv=none; d=google.com; s=arc-20160816; b=eCCXUQMhdQyFXcCPjQ1hYgxGJdrUe/p9fKqrPPW6OY663+0WIAt4YqkKQZ9PVA4VPS r/uZrvjkqVYPIz3qSmwEFcealzY+v6343qjSrafWBfGN7ydG2Ydm4IpFR591hVF2Qao3 v/2yGftMIdnGUyPgUdcWHTAoU5eqK6dTaS+St0DRIvKkL+QyFnp0qvl8ORfohNfldXow 28cMMnKVVDmCrrnJ2Hoy9/BSbD+xlrAVERUb7q+1DspIY998sIJH7jE0KJVmF3TTxy0b qDB5bTflqKljUwC0tOm1ydjxAmY88IRBWmkw3ACTBCZBRx3uHeAN9M9Znk3L5xz3kVi2 XNsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QAciJFIg4zoCTHHi5juCYJWiFjMadA5FnHFcPU+cSGU=; b=wVI5j/CsDMRBSaszsMzeQjL5EQhbTnrhc9AQaOeF2Tw/iOEpCUkCds1ITke6Nco3OI XBp7+tZK20iPoUc9tNqevvrmxX63bogwgxiEDjtGVrYCt5lMeuM3iyYDjjpJJdTbJ5za qi83Jnd24FMWO5VqUwHHvGuWWI1v4OHHy25scYXoduf65Vc0uF/6GBr4j3J9jTK213f5 2Z3Sd5hKSkKvJxgeJMHBUUhdc7/TAr6tEhZc3ye5IEx1WbIGpv3vR/ltUKEnMk8sI9z0 AJTc+9iSOeNtEg42cdizjyyaW9zBnfo/03T6zfDKXAeBlJw9dMLJqsu399kA5Ie1XIvu /1+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vkiriIId; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a635843000000b003f5d8756675si4846414pgm.371.2022.07.08.08.13.47; Fri, 08 Jul 2022 08:13:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vkiriIId; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238687AbiGHOuU (ORCPT + 99 others); Fri, 8 Jul 2022 10:50:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238766AbiGHOuC (ORCPT ); Fri, 8 Jul 2022 10:50:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BEA3F3D; Fri, 8 Jul 2022 07:49:59 -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=QAciJFIg4zoCTHHi5juCYJWiFjMadA5FnHFcPU+cSGU=; b=vkiriIIdCQqnGp2fFPao0drgRk +uBI7Ksn1Zl7LZxqeJb8Whhcxgt+Ehf2tn4kSsz7FJxOOohPE6FkPZg/kLKdtvBcnFvkxWCsgHZoY tBMSbEHEoY3fjeguT4ervzbV6WJkPwm1d4SzR9Mf/jw+F7IcczTm3fBDTHZE3N1ykqCKLXwlRiesD ULTCQB3v4lghZ5+lyP9Zx7qTPe8XqwJoU9shAq5Cb2WzyaXDRAjJ+95LpcuDSIRo9Y5FW5ikeWBG4 mwVK6Dsy2eO2WWG+YuYfoUds+Zt+Hv97W926YpwniFaWLBI+iB9YDWcck+aEmUrfDI4CLdoliHsy8 VztsQR8w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9pIl-003Zr0-Gv; Fri, 08 Jul 2022 14:49:51 +0000 Date: Fri, 8 Jul 2022 15:49:51 +0100 From: Matthew Wilcox To: Ira Weiny Cc: Bjorn Helgaas , 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 2/3] pci/doe: Use devm_xa_init() Message-ID: References: <20220705232159.2218958-3-ira.weiny@intel.com> <20220707160646.GA306751@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 08, 2022 at 07:45:12AM -0700, Ira Weiny wrote: > On Thu, Jul 07, 2022 at 11:06:46AM -0500, Bjorn Helgaas wrote: > > On Tue, Jul 05, 2022 at 04:21:58PM -0700, ira.weiny@intel.com wrote: > > > From: Ira Weiny > > > > > > The XArray being used to store the protocols does not even store > > > allocated objects. > > > > I guess the point is that the doe_mb->prots XArray doesn't reference > > any other objects that would need to be freed when destroying > > doe_mb->prots? > > Yes. > > > A few more words here would make the commit log more > > useful to non-XArray experts. > > I'll update this to be more clear in a V1 if it goes that far. But to clarify > here; the protocol information is a u16 vendor id and u8 protocol number. So > we are able to store that in the unsigned long value that would normally be a > pointer to something in the XArray. Er. Signed long. I can't find drivers/pci/doe.c in linux-next, so I have no idea if you're doing something wrong. But what you said here sounds wrong.