From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Tal Zussman <tz2294@columbia.edu>,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec()
Date: Mon, 7 Sep 2026 16:09:40 +0200 [thread overview]
Message-ID: <f21ab49e-b61e-43fa-8846-e5ff6a7b25b3@kernel.org> (raw)
In-Reply-To: <20260901-mm-remove-unused-helpers-v2-2-f6474e169c23@columbia.edu>
On 9/1/26 21:38, Tal Zussman wrote:
> totalram_pages_inc() and totalram_pages_dec() have had no callers since
> commit 7fbc5e26123e ("memblock: extract page freeing from
> free_reserved_area() into a helper") and commit 287b89773d81
> ("powerpc/pseries/cmm: Use adjust_managed_page_count() insted of
> totalram_pages_*"), respectively. Remove them.
>
> Drop the totalram_pages_inc() stub from tools mm.h too.
>
> Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/mm.h | 10 ----------
> tools/include/linux/mm.h | 4 ----
> 2 files changed, 14 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index e3736c42c4db..c105a3758915 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -57,16 +57,6 @@ static inline unsigned long totalram_pages(void)
> return (unsigned long)atomic_long_read(&_totalram_pages);
> }
>
> -static inline void totalram_pages_inc(void)
> -{
> - atomic_long_inc(&_totalram_pages);
> -}
> -
> -static inline void totalram_pages_dec(void)
> -{
> - atomic_long_dec(&_totalram_pages);
> -}
> -
> static inline void totalram_pages_add(long count)
> {
> atomic_long_add(count, &_totalram_pages);
> diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h
> index 84b5954f66c3..d586a510e6e1 100644
> --- a/tools/include/linux/mm.h
> +++ b/tools/include/linux/mm.h
> @@ -33,10 +33,6 @@ static inline phys_addr_t virt_to_phys(volatile void *address)
> return (phys_addr_t)address;
> }
>
> -static inline void totalram_pages_inc(void)
> -{
> -}
> -
> static inline void totalram_pages_add(long count)
> {
> }
>
Also very nice!
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
prev parent reply other threads:[~2026-09-07 14:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 19:38 [PATCH v2 0/2] mm: remove three unused helpers from mm.h Tal Zussman
2026-09-01 19:38 ` [PATCH v2 1/2] mm: remove unused mark_page_reserved() Tal Zussman
2026-09-07 14:08 ` David Hildenbrand (Arm)
2026-09-01 19:38 ` [PATCH v2 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec() Tal Zussman
2026-09-07 14:09 ` David Hildenbrand (Arm) [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=f21ab49e-b61e-43fa-8846-e5ff6a7b25b3@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=tz2294@columbia.edu \
--cc=vbabka@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®