Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3172168ybi; Fri, 5 Jul 2019 03:07:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+GeHGkNJVH8gyVV7Z3pusSHemp23nHmKPn6mp9We0/bjyaWisBn1hY80iKSuenD8LmCA2 X-Received: by 2002:a17:90a:32ed:: with SMTP id l100mr4354798pjb.11.1562321277041; Fri, 05 Jul 2019 03:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562321277; cv=none; d=google.com; s=arc-20160816; b=uYuBuP/AlJTV/aBQuFgXIGs4pk6g8YcrSZN8TLTOHI8Xw4hi7YeoffCJPRt/l+n02M erIuiOeAz6nAudB/xBoTzA2QvLCk6PagzdNE/u8WjWyXr8MzZavA/lfQtTkE08s5Gf92 AiMBMk59Aldx+iUV3cW2zT/LmxbCZQIzUFmPRf2KRLIyGztuun+lJxT5au+05HSTVJKR a9qIB9CDFwF2f66j27D/9usY1+wPFeKHTSU4MwSstZUah4VHJaUuw/kravf3MzXzXKxF ViMpvySgebth/0/sWP7ArCsicyLVhEbZubL3oEN5aKZMQLwOmsuTIYJbtKVTRuAGV32g W98w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=jMclZbYI0z8cPswpzsHCXyiruY7UCl3Gy6Ti75NcLzM=; b=eaxImJKoKCGUnXQd3qNwIrB1mOVLaogIl0mSQbkUFx8gEtM7QquZD+mBrlKafdwuAB MFJfjo68qh8l6AZ6/3OEsID1yht/BC5HTIffopiECFoodrPU/jbGhT+51N9valXkxl4P cTm4u8ConjsuqO0FrxCC1pgscpEDWRmjdAuOFXvY+L3g/v06ebDK7NGvpYlD4Si38cJ/ Q3I348MX3OA6D5LCZQEaOPqyYhriY/bksOgSt1rMn7VIr5R2+OVW6FDY85cI+Q2oW5UF L8mZqtZH5yevUV9Yb19Ud2zYDxVZwtSUczwEAa6dtTTP1cO4lSB/ek+C802NF8J3nSZ2 m+Cg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23si8785671pff.103.2019.07.05.03.07.42; Fri, 05 Jul 2019 03:07:57 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728001AbfGEKHP (ORCPT + 99 others); Fri, 5 Jul 2019 06:07:15 -0400 Received: from inva021.nxp.com ([92.121.34.21]:47968 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727275AbfGEKHN (ORCPT ); Fri, 5 Jul 2019 06:07:13 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 682E12001B2; Fri, 5 Jul 2019 12:07:11 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DF9BB2006F9; Fri, 5 Jul 2019 12:07:02 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 779E7402EC; Fri, 5 Jul 2019 18:06:50 +0800 (SGT) From: Hou Zhiqiang To: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, robh+dt@kernel.org, mark.rutland@arm.com, l.subrahmanya@mobiveil.co.in, shawnguo@kernel.org, leoyang.li@nxp.com, lorenzo.pieralisi@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Cc: Mingkai.Hu@nxp.com, Minghuan.Lian@nxp.com, Xiaowei.Bao@nxp.com, Hou Zhiqiang Subject: [PATCHv6 04/28] PCI: mobiveil: Update the resource list traversal function Date: Fri, 5 Jul 2019 17:56:32 +0800 Message-Id: <20190705095656.19191-5-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190705095656.19191-1-Zhiqiang.Hou@nxp.com> References: <20190705095656.19191-1-Zhiqiang.Hou@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Code that executes the resource list traversal does not need to delete any node therefore using the *_safe() API version is useless. Replace function resource_list_for_each_entry_safe() with the resource_list_for_each_entry() counterpart. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V6: - Rebased the patch, no functional change. drivers/pci/controller/pcie-mobiveil.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 53df317..c359654 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -562,7 +562,7 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) { u32 value, pab_ctrl, type = 0; int err; - struct resource_entry *win, *tmp; + struct resource_entry *win; err = mobiveil_bringup_link(pcie); if (err) { @@ -612,7 +612,7 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) program_ib_windows(pcie, WIN_NUM_1, 0, MEM_WINDOW_TYPE, IB_WIN_SIZE); /* Get the I/O and memory ranges from DT */ - resource_list_for_each_entry_safe(win, tmp, &pcie->resources) { + resource_list_for_each_entry(win, &pcie->resources) { type = 0; if (resource_type(win->res) == IORESOURCE_MEM) type = MEM_WINDOW_TYPE; -- 1.7.1