[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z0jzNx1UjIJuclIf@google.com>
Date: Thu, 28 Nov 2024 22:48:23 +0000
From: Roman Gushchin <roman.gushchin@...ux.dev>
To: John Sperbeck <jsperbeck@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Shakeel Butt <shakeel.butt@...ux.dev>,
Muchun Song <muchun.song@...ux.dev>, cgroups@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: memcg: declare do_memsw_account inline
On Thu, Nov 28, 2024 at 12:39:59PM -0800, John Sperbeck wrote:
> In commit 66d60c428b23 ("mm: memcg: move legacy memcg event code
> into memcontrol-v1.c"), the static do_memsw_account() function was
> moved from a .c file to a .h file. Unfortunately, the traditional
> inline keyword wasn't added. If a file (e.g., a unit test) includes
> the .h file, but doesn't refer to do_memsw_account(), it will get a
> warning like:
>
> mm/memcontrol-v1.h:41:13: warning: unused function 'do_memsw_account' [-Wunused-function]
> 41 | static bool do_memsw_account(void)
> | ^~~~~~~~~~~~~~~~
>
> Fixes: 66d60c428b23 ("mm: memcg: move legacy memcg event code into memcontrol-v1.c")
> Signed-off-by: John Sperbeck <jsperbeck@...gle.com>
Acked-by: Roman Gushchin <roman.gushchin@...ux.dev>
Thanks!
Powered by blists - more mailing lists