Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp688164imm; Tue, 15 May 2018 07:45:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpzgKAK5c4nHxDRz5/DwllMt8JQf0Mk2hxLb4ApoWAPxRbzdvIKsG8sH+ajiuGtAhLiFHzI X-Received: by 2002:a63:380e:: with SMTP id f14-v6mr5486356pga.242.1526395515401; Tue, 15 May 2018 07:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526395515; cv=none; d=google.com; s=arc-20160816; b=FWM3ZDH8mYo03vN85uYdtw7TZnfI8F+VK42gFnqUIg+/7DhRHRQ/ma1xSb5w/F/+ru BQHxSbardL8FCR8DaXGNlbn+B+bQPwN/L5dwViA95W2zF+/TM6t52F5llo8Tn1ewGokX Hf63NxB58Fx3fVt81BagOxtU0Go3LOz4/T/fcloKkgtmuQLtpuCt1sAIV2Tpe5on4dW2 QTMxD98SpBa94m9nDKW6vSVAbfvR0jC9HgIkTuqzJWlw0zb7s5xxFaEbxKE7m6Vrwvk/ 4feEUTXWVmGTSx7pv8geVAFDfUd7VE4SiYTXS1NOxAdhtwKtP/mjly7YP7Mw2FieKNWM efpQ== 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:dkim-signature :arc-authentication-results; bh=5PB+TxYVgs/pGSeROV2WE6io6ocnEHeR9BLtlyrl+8k=; b=pd8AolXDP6qpV05i3N17M57Ep4DoZ5MXpUKgObLHFyfarrlWDoPCLZSVh9ZgNqIqld zfmOJrWX0fxqTIKWvFqn/kaTas9GyTDSi4Nlm9NNccucimP1TiHPcXx/q8BATQMni1Ez GR5lVfpCcZnL10APNSIUsTXdAhl6sOWzVzrEtNTaBksJ0PMHy735b3CScM6P2tbtBXaF 44es7KX7P5b+/1OmSJlPWe1Rx/Z2j1Mg2sGn/KMfpVBHN+JMo2ek6lznbGM1Nq3m9TEs 1L4tLaKCMVq671Wku0i9iAcGLRUGnGRFRMnc+0Z7tDPKQtb17iHfp5J6rQfwbiOg/kt9 KPaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=GxoF5+pX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si162379pgs.226.2018.05.15.07.45.00; Tue, 15 May 2018 07:45:15 -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=@synopsys.com header.s=mail header.b=GxoF5+pX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753825AbeEOO2t (ORCPT + 99 others); Tue, 15 May 2018 10:28:49 -0400 Received: from smtprelay6.synopsys.com ([198.182.37.59]:42870 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753709AbeEOO2q (ORCPT ); Tue, 15 May 2018 10:28:46 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 530EE1E04B6; Tue, 15 May 2018 16:28:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1526394524; bh=HWCTQg0Kx4+498yAVH5Q62R/+RWaHzvNyp06u/8IJhc=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=GxoF5+pXWnAbC+4LOjHvgLtwQxxEE/eeGN4hemPaqB113zQw4cNI+0m2j9GX/adbn O/vTXfSs/7zM+av2IPiuvCpY/Ky7tax1lG1FH9e0r9m/0Zv0gL3+f69h8nSZrL67S7 fuh5/Ui77iv9qeBkgWmKySu/WQYpvKalOm/BvwlrStuxA8KB8dZEtqTKyWhK4mgSAp xfVAyZqNbA1bjsh3NCEzggWqx5qEExwk0SqPGW/Prt+H9aF+3aaP+LmeaXVr/DeWLV grlGpdB/jXxe+Gnvh0NZo9ZKNMu4/bENMBDDX0PTSi1c9tfnkmxVfgpgId9WGkOigQ OAr5b1uSBkRxw== Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id 431B95DC6; Tue, 15 May 2018 07:28:43 -0700 (PDT) Received: from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 15 May 2018 07:28:43 -0700 Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by DE02WEHTCA.internal.synopsys.com (10.225.19.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 15 May 2018 16:28:40 +0200 Received: from [10.107.19.88] (10.107.19.88) by DE02WEHTCB.internal.synopsys.com (10.225.19.80) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 15 May 2018 16:28:40 +0200 Subject: Re: [PATCH v4 6/8] PCI: Rework of_pci_get_host_bridge_resources() to devm_of_pci_get_host_bridge_resources() To: Jan Kiszka , Bjorn Helgaas , Linux Kernel Mailing List , , CC: Vladimir Zapolskiy , Jingoo Han , Joao Pinto , "Lorenzo Pieralisi" References: <3aeb2ed038cbce8fe744b614dc19d414555a7e8f.1526375226.git.jan.kiszka@siemens.com> From: Joao Pinto Message-ID: <73eb2628-0d45-f23b-72c2-e463aef71f3f@synopsys.com> Date: Tue, 15 May 2018 15:28:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <3aeb2ed038cbce8fe744b614dc19d414555a7e8f.1526375226.git.jan.kiszka@siemens.com> Content-Type: text/plain; charset="utf-8" Content-Language: pt-PT Content-Transfer-Encoding: 8bit X-Originating-IP: [10.107.19.88] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jan, Às 10:07 AM de 5/15/2018, Jan Kiszka escreveu: > 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, convert the > existing function to a managed version. > > CC: Jingoo Han > CC: Joao Pinto > CC: Lorenzo Pieralisi > Signed-off-by: Jan Kiszka > --- > drivers/pci/dwc/pcie-designware-host.c | 2 +- > drivers/pci/host/pci-aardvark.c | 2 +- > drivers/pci/host/pci-ftpci100.c | 2 +- > drivers/pci/host/pci-v3-semi.c | 2 +- > drivers/pci/host/pci-versatile.c | 2 +- > drivers/pci/host/pci-xgene.c | 2 +- > drivers/pci/host/pcie-altera.c | 2 +- > drivers/pci/host/pcie-iproc-platform.c | 2 +- > drivers/pci/host/pcie-rcar.c | 2 +- > drivers/pci/host/pcie-rockchip.c | 2 +- > drivers/pci/host/pcie-xilinx-nwl.c | 2 +- > drivers/pci/host/pcie-xilinx.c | 2 +- > drivers/pci/of.c | 30 ++++++++++++------------------ > include/linux/of_pci.h | 4 ++-- > 14 files changed, 26 insertions(+), 32 deletions(-) > > diff --git a/drivers/pci/dwc/pcie-designware-host.c b/drivers/pci/dwc/pcie-designware-host.c > index 5a535690b7b5..a8f6ab54b4c0 100644 > --- a/drivers/pci/dwc/pcie-designware-host.c > +++ b/drivers/pci/dwc/pcie-designware-host.c > @@ -342,7 +342,7 @@ int dw_pcie_host_init(struct pcie_port *pp) > if (!bridge) > return -ENOMEM; > > - ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, > + ret = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, > &bridge->windows, &pp->io_base); > if (ret) > return ret; (snip...) Thanks for this patch! Acked-by: Joao Pinto