Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp623019pxb; Wed, 6 Oct 2021 11:49:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi44sg5l2QYNNsop5JxZmylts1aFkounoUh6Jd4+uIva2cY8r55KGUh8KKBv0t8AZKlG/m X-Received: by 2002:a62:7ac6:0:b0:44c:8cb4:c1a9 with SMTP id v189-20020a627ac6000000b0044c8cb4c1a9mr8003012pfc.44.1633546142414; Wed, 06 Oct 2021 11:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633546142; cv=none; d=google.com; s=arc-20160816; b=fckbLiACB+DMPwqzq55JiRm0ShgkOhNntgMLoGe0bhSTa11VuHLl1sTJoBqjgQDfRg B/YRZHqAiebk3Gog5Aoe5d/VH/Ve2l9CO9IkNZTiwh1chw+94AYVb57iuQ23Xest3nes XxvkU98c4F+0KdtRaRRyGfpb3eppPzngAb7uZfGEg4a1ErUj73h0qWMbP4WGRyChl6Hu UxzzvqhuHcde4LHIYgHD8pA5c35sWmm8VDDNDtOLm+u3HlORYBUI0gD9XB2Xant6wD8V QEBlIwSBhkXW+QHWb1v6hOvAtQJaQPOZ5RsDQ7fIvDBRTpPkdjXEOBKbhArmRGHOgWD9 bf5g== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=7oJgd6HywsqE0pa9tT3ajaRhG+TcMTiAIw04PsU7Dzw=; b=fG4FVwIsp/oJ3pTbqBG+5nv32x6iBtzZU7hSY4mohT1xe0WIaN6s3uRNYe7zMR5mF0 Te7h3FOmPrBWJjkScG53h8ZNQKxnWg1NZ05wp00/rg5JrteV55cDzgbMrLeO+yumOL1Q b+pSJtteE54FiQ17PXa+ufSDs89LwdLF8DlK5fIjaZJ5llovBvS30PSY6Jdtfxi7dNWq RJaUYQBkjrK5F+FVx8L5ew8MHtOhedkjZdPEvJJCU3EcIa2K55lxPUJ++AOo8hcTFpHp yL4Mjcp4963PfNBv2SsGHh8p6I5Z/Po/fNLoS+HFlxIjq4aG6NxCDkQZ1Cpy6Kk3AM1+ g+zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lGyN9UqI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si26251950pll.315.2021.10.06.11.48.48; Wed, 06 Oct 2021 11:49:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lGyN9UqI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232027AbhJFStt (ORCPT + 99 others); Wed, 6 Oct 2021 14:49:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:52078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbhJFSts (ORCPT ); Wed, 6 Oct 2021 14:49:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A03B061151; Wed, 6 Oct 2021 18:47:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633546075; bh=HrcL0ayDMOGay/UhADOzS58AHR+GsrQecIN7HiwSvuM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=lGyN9UqI/uVwEdNf9IrccA50HTO/SX495o/8pmJ9Dik/1vQVNHT72fnYNGtmt1m56 aR6Dz2yOJz6gzzkLWPLvtLRiEm2JVNEoJ3k3EK6MXPJMdIdkhHed3uHBzfCgwaRpPp 59GpfoT0FL6H4Xknq+LeormFEtwXqxnuhvYcns2z/QtmulHwKCD/WoIVkkgT/x9r+O hnkASyIxZ4n1jywojTVmggmbuqeK5lhW5jW3dxzDnOzhf6pzT/7VgNoH6CC2LZN3sm QJHQCgdgRmHcvoqbMNUqsCPR6La/z0bqGsR5S90yHWWSczSc8/yaVB45vNQNOP50cO JHJHzLULM+l5g== Date: Wed, 6 Oct 2021 13:47:54 -0500 From: Bjorn Helgaas To: Heikki Krogerus Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Bjorn Helgaas , Andy Shevchenko , Zhangfei Gao , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v3 1/3] PCI: Convert to device_create_managed_software_node() Message-ID: <20211006184754.GA1171384@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211006112643.77684-2-heikki.krogerus@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 06, 2021 at 02:26:41PM +0300, Heikki Krogerus wrote: > In quirk_huawei_pcie_sva(), use device_create_managed_software_node() > instead of device_add_properties() to set the "dma-can-stall" > property. > > This is the last user of device_add_properties() that relied on > device_del() to take care of also calling device_remove_properties(). > After this change we can finally get rid of that > device_remove_properties() call in device_del(). > > After that device_remove_properties() call has been removed from > device_del(), the software nodes that hold the additional device > properties become reusable and shareable as there is no longer a > default assumption that those nodes are lifetime bound the first > device they are associated with. This does not help me determine whether this patch is safe. device_create_managed_software_node() sets swnode->managed = true, but device_add_properties() did not. I still don't know what the effect of that is. > Reviewed-by: Andy Shevchenko > Acked-by: Zhangfei Gao > Signed-off-by: Heikki Krogerus > --- > drivers/pci/quirks.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index b6b4c803bdc94..fe5eedba47908 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -1850,7 +1850,7 @@ static void quirk_huawei_pcie_sva(struct pci_dev *pdev) > * can set it directly. > */ > if (!pdev->dev.of_node && > - device_add_properties(&pdev->dev, properties)) > + device_create_managed_software_node(&pdev->dev, properties, NULL)) > pci_warn(pdev, "could not add stall property"); > } > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_HUAWEI, 0xa250, quirk_huawei_pcie_sva); > -- > 2.33.0 >