Received: by 10.192.165.148 with SMTP id m20csp4100143imm; Mon, 30 Apr 2018 11:43:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoXCXyYw5p1192xCTvMKyWY2MrXcd4/i/tblmQ2BJ8Oj8hNeaOHldOeUcVufd+ewAOsR+jT X-Received: by 2002:a65:600a:: with SMTP id m10-v6mr10764988pgu.281.1525113827534; Mon, 30 Apr 2018 11:43:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525113827; cv=none; d=google.com; s=arc-20160816; b=nJOxBI4mXffST/yD0KerEt0CuhvYG63WVmTdGd/C/CkNc8PNxKieeAd0mnc+WST1RF f+1OR0wuuXe1UYWNJ88qcDaNzcohzvQDIz2bOOypvhjk1U5m7lxe8YIU1xG7cqlOARYo QdBiQJLKhvAJbS0zrS3ubGGXTEr/gvtlrEIoEujBiTh+VNQ6X1pAdcy8grr4qxQPvCnE NkXLobsik6Bt5EchHpVAC5ljcR7FcdV0OsmVwXbWNvm9TjjiwWbNN/zQANTQ/hE3WQ1o mfTbOyFvpjyn/jkHHwxfgug0WduqJpXeEWa9SpcawV/igIlYV840jZi9RorPy3XM0bj6 CCBQ== 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:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=0GxfcMOQR7y8KlPqwRFgG4Ea5eMSp1CCzgKgpmzgxJk=; b=QjbTn9oth4AyRNOWwlmUNc38HUs+DYUIs5iAEvKp5AGgw/D8hSJnvlqERzlcE51s5p httSMH4FSSKv4C1Fe43sBU8DLNeLfaf2kIqm7uOIWvF3xOoxJZnqCRQbm9x8wPFe9Ju3 9AGlfvJaR/mrxHBnezXqjHGm0UzuLVfxAHnUANUD/6ECqC6kDSpU9TIx/aZkQlUrseIt bOtMJWGVbDW1hR3UEJFxNx4Qn8l2lf3e2B+M7O+on2AB9BuKc/5Nfyqct8OmMhaRDaSC cBc7IVZy9svaxRrgLGOZA5jyi3zBC0yQmlkL3t6Z4Ce4WVjFJ+VDNrYCLQiKEwLMYgNm nJtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=F8TcSwLp; dkim=pass header.i=@codeaurora.org header.s=default header.b=DJG32ndE; 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 h67si8098561pfk.15.2018.04.30.11.43.33; Mon, 30 Apr 2018 11:43:47 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=F8TcSwLp; dkim=pass header.i=@codeaurora.org header.s=default header.b=DJG32ndE; 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 S1754638AbeD3SnN (ORCPT + 99 others); Mon, 30 Apr 2018 14:43:13 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34344 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753397AbeD3SnM (ORCPT ); Mon, 30 Apr 2018 14:43:12 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CC1B360558; Mon, 30 Apr 2018 18:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525113791; bh=5tUvPvgriBbng/zRpILRfHkK9HB9+D0KRKHKaCIpMcY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=F8TcSwLp1kmDHoOwd5IgbZPpB7kWmPsHh60s1ppLTo2hHQEK0LtPLtrYt1J3Nx9xK QqowCYoaNmb8BeI/G+y3p2DteTW9l9iAEAzOgUDpaWMzyy4tRJno5i2XoQ1y590OH4 Dqk1L4HUrXwbaT4kOkGLgr+Z3lY7yoQVh3fy5Rbo= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.235.228.150] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0A44A60556; Mon, 30 Apr 2018 18:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525113790; bh=5tUvPvgriBbng/zRpILRfHkK9HB9+D0KRKHKaCIpMcY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=DJG32ndERwrgDGFFjdFOb0vm3Xy3wO0BsLqslypcxtbhsUrYooAunaazlUAPqmUxW 6ilqrVy9gBf8YSxQ3WzNEpNqrTUVivBw15KLOquYnpd/Zp/E7inZRbrEYmFXk4LdRc kENrXPbK4S0cERkZUGgtMCW2MzG9fUlem8wJ88xQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0A44A60556 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH 3/6] PCI: Introduce devm_of_pci_get_host_bridge_resources To: Bjorn Helgaas , Jan Kiszka 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> From: Sinan Kaya Message-ID: <5e218659-b512-b622-25e0-5bb5a8f4b87d@codeaurora.org> Date: Mon, 30 Apr 2018 14:43:08 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180430184007.GC95643@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 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. > > Looks like it was added by cbe4097f8ae6 ("of/pci: Add support for > parsing PCI host bridge resources from DT") in v3.18, so it's been > around for a while and I guess it would be nice to have a grace period > before removing it. > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.