On 2022-09-22 18:50:25 [+0800], Chen Zhongjin wrote:
--- a/kernel/kcov.cso how does this work if you remove pos?
+++ b/kernel/kcov.c
@@ -133,10 +133,8 @@ static struct kcov_remote *kcov_remote_add(struct kcov *kcov, u64 handle)
static struct kcov_remote_area *kcov_remote_area_get(unsigned int size)
{
struct kcov_remote_area *area;
- struct list_head *pos;
- list_for_each(pos, &kcov_remote_areas) {
- area = list_entry(pos, struct kcov_remote_area, list);
+ list_for_each_entry(pos, &kcov_remote_areas, list) {
if (area->size == size) {Sebastian
list_del(&area->list);
return area;