Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1193699rwe; Sat, 27 Aug 2022 02:51:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR5IHh5sA2t1D0bnEn4Yw40eY2qUBzbrmpjosRQpAoAaYX1rH9RXEDHOYr69ZifpySW9BOn/ X-Received: by 2002:a17:906:3197:b0:73d:5e1a:44ac with SMTP id 23-20020a170906319700b0073d5e1a44acmr7605864ejy.512.1661593912656; Sat, 27 Aug 2022 02:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661593912; cv=none; d=google.com; s=arc-20160816; b=ModN/jaIgqWbIg+5VUmS5ffyyRKihPElpUZ7JG6Z8eG5Ca7CKpVpim6fwR7rkGvqBK BqOAygD8n0kd9Bc0sKBjKXWSqmfc8MfdD5NA7Rl/MxU2M9askl0ynHOByNAR7dIS/GyK KpOdDI/3Dj/jfXngasA5TJZtT4+3gVWoh+f0zoVyyeFBPsd4gOKdQ/HC3IKezB+EQn4l rTJvmKVgIG8wH9ZDQnPbTOeeB71kZy8WYz+YfiWaLhHLdljFZaKeRsPZJNNXAiyO0ShY Y6CkmJ5UM9MDthxspvSf2bh08uUiRVNnZHa08OHAQMU0PLkgR3xRdprO9CQ7x+Z8O64D uTvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jw5+gem4TwsWdAYrqXt5Y4805OOzGoJ4GiK+TEWxqCU=; b=yh9ekG0ApYnb0z0yxYS143ehHNzdNPm1EnXkR6CzSYMCvjuOS2t2uVOrhQbFIUUX/O cl1kkupW3IB0poNknURnmxYC7x25MTDFWrrvkQl3US1LAOk3zyXDbkxbqIq9cMGen7j5 N2JcK5KCM2mbQau9N3w2PdWm4WV5qj7vxhOIwwm74hv7fP/orGy0qOMA6hVBa9bFagsD 1ket7qCX5efv46GwpjlAERO6cAXJXdrSA/oOPA6LNiuVAJZR+T+xVqHEWuRI8YjOCtFi fKIvXPGuDxQKyb71GDZCj5V7mM4PvaQ9l/vzN8Eo6cLtEGZ6JAkKDTTcefPcmhx2ksh+ tgSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz10-20020a1709077d8a00b0073d758a1473si2867440ejc.171.2022.08.27.02.51.26; Sat, 27 Aug 2022 02:51:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232279AbiH0Jif (ORCPT + 99 others); Sat, 27 Aug 2022 05:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbiH0Jid (ORCPT ); Sat, 27 Aug 2022 05:38:33 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 859C18E9A5; Sat, 27 Aug 2022 02:38:32 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MFBPX2FM3zkWV9; Sat, 27 Aug 2022 17:34:56 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 27 Aug 2022 17:38:30 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 27 Aug 2022 17:38:30 +0800 From: Yang Yingliang To: , CC: , Subject: [PATCH -next] bus: ti-sysc: Use list_for_each_entry() helper Date: Sat, 27 Aug 2022 17:46:04 +0800 Message-ID: <20220827094604.3325887-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert list_for_each() to list_for_each_entry() where applicable. Signed-off-by: Yang Yingliang --- drivers/bus/ti-sysc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 51d772bb8046..8afa0245b31b 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -2526,11 +2526,9 @@ static struct dev_pm_domain sysc_child_pm_domain = { static void sysc_reinit_modules(struct sysc_soc_info *soc) { struct sysc_module *module; - struct list_head *pos; struct sysc *ddata; - list_for_each(pos, &sysc_soc->restored_modules) { - module = list_entry(pos, struct sysc_module, node); + list_for_each_entry(module, &sysc_soc->restored_modules, node) { ddata = module->ddata; sysc_reinit_module(ddata, ddata->enabled); } @@ -3211,12 +3209,10 @@ static void sysc_cleanup_static_data(void) static int sysc_check_disabled_devices(struct sysc *ddata) { struct sysc_address *disabled_module; - struct list_head *pos; int error = 0; mutex_lock(&sysc_soc->list_lock); - list_for_each(pos, &sysc_soc->disabled_modules) { - disabled_module = list_entry(pos, struct sysc_address, node); + list_for_each_entry(disabled_module, &sysc_soc->disabled_modules, node) { if (ddata->module_pa == disabled_module->base) { dev_dbg(ddata->dev, "module disabled for this SoC\n"); error = -ENODEV; -- 2.25.1