All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Xiaobo Liu <cppcoffee@gmail.com>
Cc: rust-for-linux@vger.kernel.org, ojeda@kernel.org,
	miguel.ojeda.sandonis@gmail.com, akpm@linux-foundation.org,
	david@fromorbit.com, qi.zheng@linux.dev,
	roman.gushchin@linux.dev, muchun.song@linux.dev,
	boqun@kernel.org, gary@garyguo.net, bjorn3_gh@protonmail.com,
	lossin@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com,
	tmgross@umich.edu, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH v2] rust: helpers: move list_lru and task_work helpers out of binder.c
Date: Tue, 23 Jun 2026 13:42:25 +0200	[thread overview]
Message-ID: <2026062302-girdle-entrench-11bb@gregkh> (raw)
In-Reply-To: <20260623102431.3577627-1-cppcoffee@gmail.com>

On Tue, Jun 23, 2026 at 06:24:31PM +0800, Xiaobo Liu wrote:
> The helpers in binder.c wrap generic list_lru and task_work inline
> functions and have nothing to do with binder. Move each of them to a
> file named after its own C header:
> 
>   - list_lru helpers move to list_lru.c,
>   - init_task_work moves to task_work.c.
> 
> Add the new list_lru.c to the SHRINKER entry in MAINTAINERS, which
> already covers include/linux/list_lru.h.
> 
> Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
> ---
>  MAINTAINERS                           |  1 +
>  rust/helpers/helpers.c                |  3 ++-
>  rust/helpers/{binder.c => list_lru.c} |  7 -------
>  rust/helpers/task_work.c              | 13 +++++++++++++
>  4 files changed, 16 insertions(+), 8 deletions(-)
>  rename rust/helpers/{binder.c => list_lru.c} (72%)
>  create mode 100644 rust/helpers/task_work.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index ba45953bb..428992431 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -24590,6 +24590,7 @@ S:	Maintained
>  F:	Documentation/admin-guide/mm/shrinker_debugfs.rst
>  F:	include/linux/list_lru.h
>  F:	include/linux/shrinker.h
> +F:	rust/helpers/list_lru.c
>  F:	mm/list_lru.c
>  F:	mm/shrinker.c
>  F:	mm/shrinker_debug.c
> diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
> index 998e31052..ea34101b9 100644
> --- a/rust/helpers/helpers.c
> +++ b/rust/helpers/helpers.c
> @@ -43,7 +43,6 @@
>  #include "atomic_ext.c"
>  #include "auxiliary.c"
>  #include "barrier.c"
> -#include "binder.c"
>  #include "bitmap.c"
>  #include "bitops.c"
>  #include "blk.c"
> @@ -69,6 +68,7 @@
>  #include "jump_label.c"
>  #include "kunit.c"
>  #include "list.c"
> +#include "list_lru.c"
>  #include "maple_tree.c"
>  #include "mm.c"
>  #include "mutex.c"
> @@ -93,6 +93,7 @@
>  #include "string.c"
>  #include "sync.c"
>  #include "task.c"
> +#include "task_work.c"
>  #include "time.c"
>  #include "uaccess.c"
>  #include "usb.c"
> diff --git a/rust/helpers/binder.c b/rust/helpers/list_lru.c
> similarity index 72%
> rename from rust/helpers/binder.c
> rename to rust/helpers/list_lru.c
> index a2327f1b3..3b88d1a96 100644
> --- a/rust/helpers/binder.c
> +++ b/rust/helpers/list_lru.c
> @@ -5,7 +5,6 @@
>   */
>  
>  #include <linux/list_lru.h>
> -#include <linux/task_work.h>
>  
>  __rust_helper unsigned long rust_helper_list_lru_count(struct list_lru *lru)
>  {
> @@ -19,9 +18,3 @@ __rust_helper unsigned long rust_helper_list_lru_walk(struct list_lru *lru,
>  {
>  	return list_lru_walk(lru, isolate, cb_arg, nr_to_walk);
>  }
> -
> -__rust_helper void rust_helper_init_task_work(struct callback_head *twork,
> -					      task_work_func_t func)
> -{
> -	init_task_work(twork, func);
> -}
> diff --git a/rust/helpers/task_work.c b/rust/helpers/task_work.c
> new file mode 100644
> index 000000000..cb961cd22
> --- /dev/null
> +++ b/rust/helpers/task_work.c
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +/*
> + * Copyright (C) 2025 Google LLC.
> + */
> +
> +#include <linux/task_work.h>
> +
> +__rust_helper void rust_helper_init_task_work(struct callback_head *twork,
> +					      task_work_func_t func)
> +{
> +	init_task_work(twork, func);
> +}
> -- 
> 2.34.1
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/process/submitting-patches.rst for what
  needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot


      reply	other threads:[~2026-06-23 11:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23  9:39 [PATCH] rust: helpers: move list_lru and task_work helpers out of binder.c Xiaobo Liu
2026-06-23  9:52 ` Miguel Ojeda
2026-06-23 10:24   ` [PATCH v2] " Xiaobo Liu
2026-06-23 11:42     ` Greg KH [this message]

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=2026062302-girdle-entrench-11bb@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=a.hindborg@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=cppcoffee@gmail.com \
    --cc=david@fromorbit.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=muchun.song@linux.dev \
    --cc=ojeda@kernel.org \
    --cc=qi.zheng@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.