Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4227449ybi; Tue, 11 Jun 2019 03:10:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLwMk/vcMhQbOv9+Z5rnyHh3nKaINFymWXxhfU7HfALtdHGRLt3ZWjaRzjnpF7jx1uVU9R X-Received: by 2002:a17:90a:9d81:: with SMTP id k1mr25956884pjp.63.1560247802956; Tue, 11 Jun 2019 03:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560247802; cv=none; d=google.com; s=arc-20160816; b=NFNt/dx0g4TuNrb4l3sxkGFATlFTg5Q4tZUvcU4lD6NA+cKBeCj2Qc4uZBv8Yn65s7 D0pCYGV53L5GtKcMkR/KhC5EjyGbFv/CkCT8qHrYMy6h44aGVPbAK5Gje/NhjmxMJkDk RVqUlWuqoSfgsStJjwe/Iey2rEmAj2yNO9ePqYPdOXPZ2y+vycvaj/N29VhqlGORgnko EeucGg+9ibCTOMJtcq+KFWKbPK9C38lZzb5vN/YCGrnfnfTGoXJsmZvpU6JVOSXk68d4 8SXlvonSgsW5ZBl6dk8xqh9vvDMC2oS/Q3X+ZMu0hPVYU2JaltW4zP24mQ0e/vTRF9do MbZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=mnW85f/TsH1CCn5aEShs7AeTpcLrJ8wCQcA/IRTcktU=; b=xBUv/rhSBpAYZzmNBPr+Y3bbdEE03B/5by5rQVe5S64lD1KFdWmoIQSgM5qF/Hh9t3 zSnCBjF/lap4lC9eUUnVqIP5aPL28t+XnIka+ZwNldC0Ujzt1wWituz9cu+iPmFT9zLG jIYInfwH5A5HBXJPC1MHB8/KFtn+WbOVksDt2HhhL7QsoVjVoOIB5Nrno74j0lol5Rri 9ImNvQ+GeWY+nlQtJq/GiS9LzUNeHgZxIguHLV2piCneXGUKeI4NJsG+FhsaXCUcPhnU HX2HCflsrpwDfwZ7qxauxLCUWFWAuYulYR56Vuq7aaRzVlXj6w2lT/uEq7fLGHkrTbLU ztgA== 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 g145si12759580pfb.173.2019.06.11.03.09.46; Tue, 11 Jun 2019 03:10:02 -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 S2405178AbfFKKJT (ORCPT + 99 others); Tue, 11 Jun 2019 06:09:19 -0400 Received: from foss.arm.com ([217.140.110.172]:57476 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728865AbfFKKJT (ORCPT ); Tue, 11 Jun 2019 06:09:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C19D9337; Tue, 11 Jun 2019 03:09:18 -0700 (PDT) Received: from redmoon (unknown [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1E0923F557; Tue, 11 Jun 2019 03:11:00 -0700 (PDT) Date: Tue, 11 Jun 2019 11:09:15 +0100 From: Lorenzo Pieralisi To: Alan Mikhak Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kishon@ti.com, linux-riscv@lists.infradead.org, palmer@sifive.com, paul.walmsley@sifive.com Subject: Re: [PATCH v2] PCI: endpoint: Clear BAR before freeing its space Message-ID: <20190611100915.GD29976@redmoon> References: <1558648647-14324-1-git-send-email-alan.mikhak@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1558648647-14324-1-git-send-email-alan.mikhak@sifive.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 02:57:27PM -0700, Alan Mikhak wrote: > Associated pci_epf_bar structure is needed in pci_epc_clear_bar() but > would be cleared in pci_epf_free_space(), if called first, and BAR > would not get cleared. > > Signed-off-by: Alan Mikhak > --- > drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to pci/endpoint for v5.3, thanks. Lorenzo > diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c > index 27806987e93b..f81a219dde5b 100644 > --- a/drivers/pci/endpoint/functions/pci-epf-test.c > +++ b/drivers/pci/endpoint/functions/pci-epf-test.c > @@ -381,8 +381,8 @@ static void pci_epf_test_unbind(struct pci_epf *epf) > epf_bar = &epf->bar[bar]; > > if (epf_test->reg[bar]) { > - pci_epf_free_space(epf, epf_test->reg[bar], bar); > pci_epc_clear_bar(epc, epf->func_no, epf_bar); > + pci_epf_free_space(epf, epf_test->reg[bar], bar); > } > } > } > -- > 2.7.4 >