* [PATCH -next] edac: Convert list_for_each to entry variant
@ 2021-06-15 6:55 Zou Wei
2021-06-17 8:21 ` Borislav Petkov
0 siblings, 1 reply; 2+ messages in thread
From: Zou Wei @ 2021-06-15 6:55 UTC (permalink / raw)
To: bp, mchehab, tony.luck, james.morse, rric
Cc: linux-edac, linux-kernel, Zou Wei
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] edac: Convert list_for_each to entry variant
2021-06-15 6:55 [PATCH -next] edac: Convert list_for_each to entry variant Zou Wei
@ 2021-06-17 8:21 ` Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2021-06-17 8:21 UTC (permalink / raw)
To: Zou Wei; +Cc: mchehab, tony.luck, james.morse, rric, linux-edac, linux-kernel
On Tue, Jun 15, 2021 at 02:55:10PM +0800, Zou Wei wrote:
> convert list_for_each() to list_for_each_entry() where
> applicable.
That conversion is applicable to one more place in that file...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-17 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 6:55 [PATCH -next] edac: Convert list_for_each to entry variant Zou Wei
2021-06-17 8:21 ` Borislav Petkov
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).