Received: by 10.192.165.148 with SMTP id m20csp249921imm; Tue, 1 May 2018 22:41:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpfQU8xI8BThue2aKmG8oF3V8WCpyX4IV7JBCCkvt49Li/VglyTHNadDJP5Jinr9PR3wHBd X-Received: by 2002:a17:902:5597:: with SMTP id g23-v6mr18811110pli.347.1525239704969; Tue, 01 May 2018 22:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525239704; cv=none; d=google.com; s=arc-20160816; b=oidEcomHC9iOhGArZ1x/st+6a20zFB66zMF8ercv6fE0+IvPDWc0qEwVhbB301n4IV sw7TgZuv/QJcHZrDGaESiaMZue5r256J47w+xWP+u58kLOv8hT5SkfYpmK9q4w7n3Vzo 6TsUrSLerx5A4LdoWYoGczS8ViknUBhja5NPTb5ICFtWysNhopExNsPDEwQlnC/3pJuZ 0hKnRaNA1PEYb9lBfB0sZ/PsCxiXicTwKrrEr5gHoyHvRONdD5SIfpamerR3nu0Jh/2T 9IBhzLF1ISFp5W4TvR7W3v7Aahdsnh/LH7qpHH5zR1sK52vRKByPT1+JNqn2Bf5DUdQ6 Xg7g== 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=z0c/rX8CZX2KDSusLN8LO7Rebgk2xz2aWwTBGUKX/gI=; b=wcYEvO4/vs4XbLapkvUDyP5Dq+BplegGlNJEVz9wBho1dC1U3yS6iAGBJHLJaNy4rW ePOsMMdmyAXK0Dp7ZSYfVhST6KlPDaCP0o6iqc2K+1dxFq8cAOUcYXFnvuiP4JapU/m4 h3Aq4ffmZhSCYwc6oh28RvJ24HUX2SY9BU/UudQYTXF63kEtOt3vftnbv0segmi9Gxwf mimTIzj2zO+L9oKuzJZkRTKvlJPgb3Dt2Dh8C0bGS8Zk2TU01lYK51qMcqgaw6a7szeh rICuEEJLuRMHg5QZnZUuacmcjdVYV3ljM5bJaaN6SbFa6R8sQLLilHIRR9HVf5DunuA+ FnIA== 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-v6si2727830ple.417.2018.05.01.22.41.30; Tue, 01 May 2018 22:41:44 -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 S1751069AbeEBFkM (ORCPT + 99 others); Wed, 2 May 2018 01:40:12 -0400 Received: from goliath.siemens.de ([192.35.17.28]:42967 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750928AbeEBFkK (ORCPT ); Wed, 2 May 2018 01:40:10 -0400 Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w425dhCX009413 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 May 2018 07:39:43 +0200 Received: from [167.87.92.193] ([167.87.92.193]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w425dg3p024618; Wed, 2 May 2018 07:39:42 +0200 Subject: Re: [PATCH 3/6] PCI: Introduce devm_of_pci_get_host_bridge_resources To: Sinan Kaya , Bjorn Helgaas Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org References: <20180427222427.GB73638@bhelgaas-glaptop.roam.corp.google.com> <869a8ad9-dd2f-8462-c0c4-2d8a62d74185@siemens.com> <20180430184007.GC95643@bhelgaas-glaptop.roam.corp.google.com> <5e218659-b512-b622-25e0-5bb5a8f4b87d@codeaurora.org> From: Jan Kiszka Message-ID: <5dd1e93a-b85b-a3eb-08de-6989c6a782c2@siemens.com> Date: Wed, 2 May 2018 07:39:42 +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: <5e218659-b512-b622-25e0-5bb5a8f4b87d@codeaurora.org> 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-30 20:43, Sinan Kaya wrote: > On 4/30/2018 2:40 PM, Bjorn Helgaas wrote: >> On Sat, Apr 28, 2018 at 09:28:47AM +0200, Jan Kiszka wrote: >>> 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? >> >> Sounds good. >> >> It'd be nice if we had some guideline about deprecation -- whether we >> actually need to mark things __deprecated, and then how long to wait >> before actually removing them, but I don't see anything in >> Documentation/. > > I'm under the impression that we don't quite care about out-of-tree drivers. > I have seen many times out-of-tree drivers to be broken due to API changes, > renames or even parameter meaning change. > > If the plan is to remove the API, just remove the API today. I've already sent a __deprecated patch on Monday [1], in v2 of this series [2]. Please vote against that there, and I will replace it with a complete removal of that API. Thanks, Jan [1] https://lkml.org/lkml/2018/4/30/22 [2] https://lkml.org/lkml/2018/4/30/24 -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux