[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLIxs1cFhneGU5D9@fedora>
Date: Fri, 29 Aug 2025 16:03:15 -0700
From: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
To: Max Kellermann <max.kellermann@...os.com>
Cc: akpm@...ux-foundation.org, david@...hat.com, axelrasmussen@...gle.com,
yuanchu@...gle.com, willy@...radead.org, hughd@...gle.com,
mhocko@...e.com, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, vbabka@...e.cz,
rppt@...nel.org, surenb@...gle.com
Subject: Re: [PATCH 05/12] mm/oom_kill: add `const` to pointer parameter
On Fri, Aug 29, 2025 at 08:31:52PM +0200, Max Kellermann wrote:
> For improved const-correctness.
>
> Signed-off-by: Max Kellermann <max.kellermann@...os.com>
> ---
> include/linux/mm.h | 2 +-
> mm/oom_kill.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index a40a3c42c904..a795deef93eb 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -3840,7 +3840,7 @@ static inline int in_gate_area(struct mm_struct *mm, unsigned long addr)
> }
> #endif /* __HAVE_ARCH_GATE_AREA */
>
> -extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm);
> +extern bool process_shares_mm(struct task_struct *p, const struct mm_struct *mm);
Nowadays we're dropping the extern keyword.
Also, Is there any reason you didn't also make the task_struct pointer const?
Powered by blists - more mailing lists