Re: linux-next: manual merge of the char-misc tree with the mm tree

From: Carlos Llamas
Date: Thu Dec 07 2023 - 11:32:45 EST


On Thu, Dec 07, 2023 at 01:42:13PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the char-misc tree got a conflict in:
>
> drivers/android/binder_alloc.c
>
> between commit:
>
> 8b59d7857c30 ("list_lru: allow explicit memcg and NUMA node selection")
>
> from the mm tree and commits:
>
> ea9cdbf0c727 ("binder: rename lru shrinker utilities")
> ea2735ce19c1 ("binder: refactor page range allocation")
> (and maybe others)
>
> from the char-misc tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell

Oh I wasn't aware of this patch. Thanks for fixing it Stephen!

I checked the diff against the char-misc tree and it looks correct. It's
a much much easier read too. I'll post it below if anyone is interested.

--
Carlos Llamas

diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index a4a4dc87ba53aa..ea5e1ba2d0d77f 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -210,7 +210,7 @@ static void binder_lru_freelist_add(struct binder_alloc *alloc,

trace_binder_free_lru_start(alloc, index);

- ret = list_lru_add(&binder_freelist, &page->lru);
+ ret = list_lru_add_obj(&binder_freelist, &page->lru);
WARN_ON(!ret);

trace_binder_free_lru_end(alloc, index);
@@ -317,7 +317,7 @@ static void binder_lru_freelist_del(struct binder_alloc *alloc,
if (page->page_ptr) {
trace_binder_alloc_lru_start(alloc, index);

- on_lru = list_lru_del(&binder_freelist, &page->lru);
+ on_lru = list_lru_del_obj(&binder_freelist, &page->lru);
WARN_ON(!on_lru);

trace_binder_alloc_lru_end(alloc, index);
@@ -931,7 +931,7 @@ void binder_alloc_deferred_release(struct binder_alloc *alloc)
if (!alloc->pages[i].page_ptr)
continue;

- on_lru = list_lru_del(&binder_freelist,
+ on_lru = list_lru_del_obj(&binder_freelist,
&alloc->pages[i].lru);
page_addr = alloc->buffer + i * PAGE_SIZE;
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
@@ -1307,4 +1307,3 @@ int binder_alloc_copy_from_buffer(struct binder_alloc *alloc,
return binder_alloc_do_buffer_copy(alloc, false, buffer, buffer_offset,
dest, bytes);
}
-