linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zou Wei <zou_wei@huawei.com>
To: <bp@alien8.de>, <mchehab@kernel.org>, <tony.luck@intel.com>,
	<james.morse@arm.com>, <rric@kernel.org>
Cc: <linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Zou Wei <zou_wei@huawei.com>
Subject: [PATCH -next] edac: Convert list_for_each to entry variant
Date: Tue, 15 Jun 2021 14:55:10 +0800	[thread overview]
Message-ID: <1623740110-15764-1-git-send-email-zou_wei@huawei.com> (raw)

convert list_for_each() to list_for_each_entry() where
applicable.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 drivers/edac/edac_device.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 8c4d947..e8b33c3 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -245,13 +245,10 @@ EXPORT_SYMBOL_GPL(edac_device_free_ctl_info);
 static struct edac_device_ctl_info *find_edac_device_by_dev(struct device *dev)
 {
 	struct edac_device_ctl_info *edac_dev;
-	struct list_head *item;
 
 	edac_dbg(0, "\n");
 
-	list_for_each(item, &edac_device_list) {
-		edac_dev = list_entry(item, struct edac_device_ctl_info, link);
-
+	list_for_each_entry(edac_dev, &edac_device_list, link) {
 		if (edac_dev->dev == dev)
 			return edac_dev;
 	}
-- 
2.6.2


             reply	other threads:[~2021-06-15  6:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  6:55 Zou Wei [this message]
2021-06-17  8:21 ` [PATCH -next] edac: Convert list_for_each to entry variant Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1623740110-15764-1-git-send-email-zou_wei@huawei.com \
    --to=zou_wei@huawei.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).