Received: by 10.192.165.148 with SMTP id m20csp1574387imm; Sat, 28 Apr 2018 00:30:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrvxZCGPXus7YlvnBTj1Xb2W7ZtEa1ow2pIdahE1KnTGHFeq4sJrlpDxWob5UEKWjtbfmHG X-Received: by 2002:a65:6584:: with SMTP id u4-v6mr4545601pgv.260.1524900632269; Sat, 28 Apr 2018 00:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524900632; cv=none; d=google.com; s=arc-20160816; b=XSnnVixKAG79dEFNjiltaz/LZekVpTHLUXWH6O1BY4XI8wpJk1FqQkeoC2x4N5XH17 H2GbhaBeGnldbR5nvlBBUaiFZrZlSQN57M03rJfLXgMU3LGah+3uSo0ujPLNDF7LifxE 3qwut2YXna4ZZ0Mi0EZdNnC8k3549fOjyb+MZKgHZ9ttVIXV2AoE3Xaz3sm8QG1cNSNB 1Lawz6EkBMsvJCQwY1HRazO2gbCiqhoK7g+iMiBoAEMARILirQWY6GxCxJZGpYQNL4Mr 8bx7CmnFptmtimpwBaHYgFB5P4lfHJrb9BCXuFolJGDa4vIxfXBH2rLmuhKbDWIqP5a7 KFEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=zIzLSpYBgYQObwm52CcRNIm+M8tsNDgezWcYWx7FZMM=; b=JHZqoXcNTEV/+QarbTqHclw5vZMOpdgpbrHsmIUiNb7Rz8X9ocpVCULC4nQew5+g0a +qlu6zgOkE8lrkCEvNFSDbPuJFXAo44ks0ehCsTYgqchTtum5ZG00JN698YF+c6emoXr BbDIHiX8+18Niu2XHoXneQ5xpCx7CydmuV2pJVcU/8YqfRqcDzVbIRIbPiyohTgVqUS6 UP0gepNZBHtRjz2IqeRic5SzA0F+6s+fheRjm+8h35KS11uTPmDrvBcAoHwcKi30qb2A qMlr6bH6Fqz7uIl0Oef0iK1l28Kj8VdnE75A6vBT32v/YYLJhGQ25Vt7ii2pXBUJcjqZ rMNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si3042000plm.202.2018.04.28.00.30.18; Sat, 28 Apr 2018 00:30:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933445AbeD1H3N (ORCPT + 99 others); Sat, 28 Apr 2018 03:29:13 -0400 Received: from david.siemens.de ([192.35.17.14]:54440 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753203AbeD1H3M (ORCPT ); Sat, 28 Apr 2018 03:29:12 -0400 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w3S7SlKE001886 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Apr 2018 09:28:47 +0200 Received: from [167.87.65.232] ([167.87.65.232]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w3S7Sl8G005166; Sat, 28 Apr 2018 09:28:47 +0200 Subject: Re: [PATCH 3/6] PCI: Introduce devm_of_pci_get_host_bridge_resources To: Bjorn Helgaas Cc: Bjorn Helgaas , Linux Kernel Mailing List , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20180427222427.GB73638@bhelgaas-glaptop.roam.corp.google.com> From: Jan Kiszka Message-ID: <869a8ad9-dd2f-8462-c0c4-2d8a62d74185@siemens.com> Date: Sat, 28 Apr 2018 09:28:47 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20180427222427.GB73638@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-04-28 00:24, Bjorn Helgaas wrote: > On Tue, Apr 24, 2018 at 05:13:39PM +0200, Jan Kiszka wrote: >> From: Jan Kiszka >> >> of_pci_get_host_bridge_resources allocates the resource structures it >> fills dynamically, but none of its callers care to release them so far. >> Rather than requiring everyone to do this explicitly, introduce a >> managed version of that service. This differs API-wise only in taking a >> reference to the associated device, rather than to the device tree node. >> >> As of_pci_get_host_bridge_resources is an exported interface, we cannot >> simply drop it at this point. After converting all in-tree users to the >> new API, we could phase out the unmanaged one over some grace period. > > It looks like it might be possible to split this into three or four > patches: > > 1) Factor __of_pci_get_host_bridge_resources() out of > of_pci_get_host_bridge_resources() > > 2) Add struct device * argument > > 3) Convert pr_info() to dev_info() > > 4) Add devm_of_pci_get_host_bridge_resources() Will do. I'm even considering 5) mark of_pci_get_host_bridge_resources() __deprecated, due to the leak and no remaining in-tree user - what do you think? Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux