The patch titled Subject: mm/damon: use 'struct damon_target *' instead of 'void *' in target_valid() has been added to the -mm mm-unstable branch. Its filename is mm-damon-use-struct-damon_target-instead-of-void-in-target_valid.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-use-struct-damon_target-instead-of-void-in-target_valid.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Kaixu Xia <kaixuxia@xxxxxxxxxxx> Subject: mm/damon: use 'struct damon_target *' instead of 'void *' in target_valid() Date: Thu, 15 Sep 2022 19:33:41 +0800 We could use 'struct damon_target *' directly instead of 'void *' in target_valid() operation to make code simple. Link: https://lkml.kernel.org/r/1663241621-13293-1-git-send-email-kaixuxia@xxxxxxxxxxx Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx> Reviewed-by: SeongJae Park <sj@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/damon.h | 2 +- mm/damon/vaddr.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) --- a/include/linux/damon.h~mm-damon-use-struct-damon_target-instead-of-void-in-target_valid +++ a/include/linux/damon.h @@ -346,7 +346,7 @@ struct damon_operations { unsigned long (*apply_scheme)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme); - bool (*target_valid)(void *target); + bool (*target_valid)(struct damon_target *t); void (*cleanup)(struct damon_ctx *context); }; --- a/mm/damon/vaddr.c~mm-damon-use-struct-damon_target-instead-of-void-in-target_valid +++ a/mm/damon/vaddr.c @@ -591,9 +591,8 @@ static unsigned int damon_va_check_acces * Functions for the target validity check and cleanup */ -static bool damon_va_target_valid(void *target) +static bool damon_va_target_valid(struct damon_target *t) { - struct damon_target *t = target; struct task_struct *task; task = damon_get_task_struct(t); _ Patches currently in -mm which might be from kaixuxia@xxxxxxxxxxx are mm-damon-sysfs-simplify-the-judgement-whether-kdamonds-are-busy.patch mm-damon-core-iterate-the-regions-list-from-current-point-in-damon_set_regions.patch mm-damon-vaddr-add-a-comment-for-default-case-in-damon_va_apply_scheme.patch mm-damon-sysfs-use-the-wrapper-directly-to-check-if-the-kdamond-is-running.patch mm-damon-simplify-the-parameter-passing-for-prepare_access_checks.patch mm-damon-sysfs-simplify-the-variable-pid-assignment-operation.patch mm-damon-core-simplify-the-kdamond-stop-mechanism-by-removing-done.patch mm-damon-use-struct-damon_target-instead-of-void-in-target_valid.patch