From patchwork Mon Mar 11 09:30:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Z.Q. Hou" X-Patchwork-Id: 10847051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C267E17DF for ; Mon, 11 Mar 2019 09:31:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA09E28E98 for ; Mon, 11 Mar 2019 09:31:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7FE928FC7; Mon, 11 Mar 2019 09:31:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 502E028EB9 for ; Mon, 11 Mar 2019 09:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4vL4fCtMi8tTEj7sgM5fMJSEK2l0bSpVMteBeEEQwzc=; b=pD6BNcgOjHcxNF +CDOOF78tKveYP4jz6UC175K6iMLUYzVUCYC6rLzDmeEL/zmZCkN2V+/9E881XIda5xN0xp8B4yie oXd96gpVr9DcynzwNAkwyz0x7022VN/HUF8lqTd0q+mvS+9b9T91qjhVsGKO5jUzxUGOBSwh+U/m4 LIpI/G7tJdAidSE3iuK6Z9j0KyCj2YlxY/XnCfYf/VaRnnqmwx5IHiP7wwIkdkS2o0CycjCoynx+d kl3/rWApUGnTAa2+UX0v4BH+ObKtM3O+B5+xSXOxSMUgQ6WiIrRQD3rHmZbhW+NNafouiaksXNhhv 5Z+vqdBssHtVJnrA/yXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3HHg-0001qn-HZ; Mon, 11 Mar 2019 09:31:48 +0000 Received: from mail-eopbgr70049.outbound.protection.outlook.com ([40.107.7.49] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3HH0-0000Rr-60 for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 09:31:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DJcuDyglLGprdVl2BE3RD+8Wv6VKcmTEEz+VNHfZ1Ik=; b=BtB3hBH+vTkqonbfIzgvRia6BeowzBdhB7q2fmVAQEs8BbITcZbkDJPZxMeQalz1RbdcRyJ0RWjgkoliBmuwF7aL1L12Fefclv/5GOhtQ3J4E3X2gYL831BGVGOTR1GRygL9vu1bIRJ2QPOuLdoXVO8+MOAHA4QFZRoXXzE2ODo= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB6566.eurprd04.prod.outlook.com (20.179.246.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16; Mon, 11 Mar 2019 09:30:44 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7%2]) with mapi id 15.20.1686.021; Mon, 11 Mar 2019 09:30:44 +0000 From: "Z.q. Hou" 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" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" Subject: [PATCHv4 06/28] PCI: mobiveil: replace the resource list iteration function Thread-Topic: [PATCHv4 06/28] PCI: mobiveil: replace the resource list iteration function Thread-Index: AQHU1+0ZNWwo8d+7skK9jlHtPc859Q== Date: Mon, 11 Mar 2019 09:30:44 +0000 Message-ID: <20190311093130.7209-7-Zhiqiang.Hou@nxp.com> References: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0015.apcprd03.prod.outlook.com (2603:1096:203:2e::27) To AM6PR04MB5781.eurprd04.prod.outlook.com (2603:10a6:20b:ad::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 19b17bd7-4da7-494f-2cb5-08d6a6043c32 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR04MB6566; x-ms-traffictypediagnostic: AM6PR04MB6566: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; AM6PR04MB6566; 23:jS7vc8CzumKPfuTpSzI+H5gghYX3n3r01vBfaoa?= =?iso-8859-1?q?Va4SkUIBv1xU+Zc?= =?iso-8859-1?q?MzPmugTxKSv/6qcPpIJ2h50y98YdwSYkux/nsLApukYMKaFHBpFSJaLuRoj2?= =?iso-8859-1?q?pC7aYA+Z3/x263WzrGx51ZlaoJecVoDkykX/XrxE7DZHS3roI9txOB/iyWPm?= =?iso-8859-1?q?HTyOpOYinPkVorUv90xkf4vdkL15WK6hQAsWVLvt8t2WEbjm6zBl0M9Jshan?= =?iso-8859-1?q?lz4aYAVLTpnfPEDu/iUrzeCl4crtO44E1hpIr3eJaqBN1W3nVmhiGDeDZlFi?= =?iso-8859-1?q?EkPrZyivaL21BR08swnBONtgesu3yxZfn2yXiNjUJWDnjDbF8L1LDdXPfSOg?= =?iso-8859-1?q?j8MXx9YVNRwvtRVi/T8xxwp+VDJeGCecDf4T+CiqTsMAzruHGSnz1uUcOjOa?= =?iso-8859-1?q?0H2y4GR3ROSyWR2NOOIo+W2kt97OV/JtC/59TZLSWD0fFHeh+P2VNCCF+e2b?= =?iso-8859-1?q?kVckEM+exRGiGB1XOOA47jj9VKUosg7DhhIoQb7VQRxS4tpf9jTYQ05o0qG/?= =?iso-8859-1?q?1VenQtPTwx0j03ky0bfdjksfnD+YrqxyHbVl+Y+4vT2TSCB98QrNihAa8+wt?= =?iso-8859-1?q?8A7WYryLZIwIzEI7WxjZ6VrT5djyO3Cqb6J0BaJB+8VWhZBdPSMEKjOEHrJR?= =?iso-8859-1?q?R8R0voPY00bma0MzJY5mubGZWn03Am9Egy+DE9BDG5G5vfXtqOsGYJtEa35a?= =?iso-8859-1?q?hRbXHkMu6TrgFthenUw8ynoHcTtxtsfW3S1lMh4nxMM3VE3GpRn4xL4a6hFv?= =?iso-8859-1?q?ezlt0z982aLLEtMKKVQGmcj5N3ozo/9HgQ+QqXjC5C9KsQkgA6/4LeCRtF8P?= =?iso-8859-1?q?yklVTzYbEUgbq6gCH4u/XTUcOG31HlLFqw4lJQQaAwf8lJuu2sEc5WRCywdb?= =?iso-8859-1?q?6LMB/vqVGYUKGiJM8355SauwSoUHZmQiybkMVGfm01FMZ0DAAmskxug7j6YD?= =?iso-8859-1?q?Fu4Lr9gYSmu4yHfda/ax8YcN1hUG74Bi0KeziavRSemkIv7VaOPKNrTSfBuU?= =?iso-8859-1?q?MoooLja537dnhFSDK/vviPh0rd3vd86mufsn2jlktddISqzbnCLOe5qB1/uR?= =?iso-8859-1?q?RUdONtvoSZ2OL9ANjU0dA0FKGyQoHPU9UD7RXod4+U+Kqfa21e/uENaOxUzb?= =?iso-8859-1?q?3DaxylnE+0OYNciVWYke42zk/SwB5QvE1hEqA94HbsWKxXBRGLtbaqrUXcL1?= =?iso-8859-1?q?be/YwIiwE42B/cx6ES/SjkZ5AlG5o8bF/BDRLdf0kU6N5ZTm5uCc6+klmcJY?= =?iso-8859-1?q?u1QmFEY1LGyVSFz6rFh9JUUfZivYp8Om1oseJNa5Y9HJnSdDIJBU7Gb8HtbO?= =?iso-8859-1?q?vUL6Vbapw=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(346002)(376002)(136003)(199004)(189003)(6436002)(478600001)(25786009)(99286004)(11346002)(2616005)(476003)(76176011)(3846002)(6116002)(81166006)(81156014)(486006)(71190400001)(71200400001)(2906002)(8676002)(2201001)(5660300002)(97736004)(6486002)(446003)(7416002)(2501003)(86362001)(14444005)(256004)(14454004)(316002)(68736007)(26005)(8936002)(6512007)(53936002)(1076003)(66066001)(386003)(54906003)(50226002)(110136005)(102836004)(6506007)(36756003)(105586002)(4326008)(106356001)(186003)(305945005)(52116002)(7736002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB6566; H:AM6PR04MB5781.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: u5hQq8uzlu/3rzDabQ6ZtdTZ+OcDKeptbsWyn97gFWQUem6CKoy6eADOn8XPZMQiQijYujKXidHvCQ4p7RVo9RKv/rXaTb/T3nP+NXUFa93qMY0yCnGFCFDNzJyBGfIHcFEzUFHM9xJHKXOAOPelj4wHdm5QXtM7rgTizGVgKJfHCEv5d8l6gBgIS4jdFZEylAa0yZlZpUbc6M+cDm39UBOxFmvoAkzp+hK8RxGYCHMUnyU6s7/XyfwsG1G61/ecM3q9OhrNhQT4oEiDGSeEMlegRFQtw1VNxMiW2/U7rfMz9d5B1svFcrgf+WXMt19hPhE2uVwkiTs0CMj7bT6CCLj+waZJrmspjCd5JX+sF8TT0XUDFt41MwnzXEe3R5OvpY8aflf8nI4Rvo7stXxo8U98IsLnKfEcCLZd2UEefPI= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19b17bd7-4da7-494f-2cb5-08d6a6043c32 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 09:30:44.2136 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6566 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_023106_380242_EF2BCDE1 X-CRM114-Status: GOOD ( 10.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "M.h. Lian" , "Z.q. Hou" , Xiaowei Bao , Mingkai Hu Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hou Zhiqiang As it won't delete any node in this iteration, replaced the function resource_list_for_each_entry_safe() with the resource_list_for_each_entry(). Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V4: - no change drivers/pci/controller/pcie-mobiveil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 8ff873023b5f..b2cc9c097fc9 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -569,7 +569,7 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) { u32 value, pab_ctrl, type; int err; - struct resource_entry *win, *tmp; + struct resource_entry *win; err = mobiveil_bringup_link(pcie); if (err) { @@ -620,7 +620,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) { if (resource_type(win->res) == IORESOURCE_MEM) type = MEM_WINDOW_TYPE; else if (resource_type(win->res) == IORESOURCE_IO)