From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Shivank Garg <shivankg@amd.com>,
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>, Kairui Song <kasong@tencent.com>,
Qi Zheng <qi.zheng@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Barry Song <baohua@kernel.org>,
Axel Rasmussen <axelrasmussen@google.com>,
Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
Baoquan He <baoquan.he@linux.dev>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Jan Kara <jack@suse.cz>, Hugh Dickins <hughd@google.com>,
Rik van Riel <riel@surriel.com>, Harry Yoo <harry@kernel.org>,
Jann Horn <jannh@google.com>, Lance Yang <lance.yang@linux.dev>,
Chris Li <chrisl@kernel.org>,
Kemeng Shi <shikemeng@huaweicloud.com>,
Nhat Pham <nphamcs@gmail.com>,
Youngjun Park <youngjun.park@lge.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
Uladzislau Rezki <urezki@gmail.com>, SJ Park <sj@kernel.org>,
Minchan Kim <minchan@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Alexander Potapenko <glider@google.com>,
Marco Elver <elver@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Pedro Falcato <pfalcato@suse.de>, Bharata B Rao <bharata@amd.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org,
bpf@vger.kernel.org, damon@lists.linux.dev,
kasan-dev@googlegroups.com
Subject: Re: [PATCH 0/8] mm: remove unused functions
Date: Mon, 26 Oct 2026 11:32:42 +0100 [thread overview]
Message-ID: <8da0110d-e05a-4559-a581-44a1fe28a41f@kernel.org> (raw)
In-Reply-To: <20261026-unused-sym-v1-0-82ca2dceabe1@amd.com>
On 10/26/26 11:30, Shivank Garg wrote:
> This series removes 16 functions and one variable in mm that have no
> users left anywhere in the tree. The functions are all static inline
> helpers in headers, which no compiler warns about: GCC never reports
> unused static inline functions, and Clang only reports them in .c
> files, and only with W=2. The variable is heap_stack_gap in
> mm/nommu.c, unused since the start of git history. Each patch covers
> one file or subsystem, so they can be picked or dropped independently.
>
> How they were found:
>
> I wrote some Python scripts, with the help of an LLM, that scan the
> whole tree for every config and architecture at once. They look for
> static inline functions without callers, and for non-static functions
> named nowhere but in their own definition, declarations, stubs and
> EXPORT_SYMBOL(). Where a ## macro could paste together one of the
> names, they read every call of that macro to see whether one does.
> The candidates were then cross-checked with a real build: a scratch
> tree marks each one __deprecated, an x86_64 allmodconfig build is run,
> and any candidate that triggers even one deprecation warning is
> dropped. The final report labels a symbol "Sure" only when that build
> confirms it unused, and "Unsure" when the build doesn't compile it or
> the scripts can't rule out a use.
>
> Before posting, I searched lore with semcode MCP for removals that
> others had already posted, to avoid duplicates. Each patch was also
> build-tested on its own.
>
> The scripts and a generated HTML report are here [1], if anyone wants
> to play with them:
>
After the merge window please. Focus on reviewing fixes on the list.
--
Cheers,
David
next prev parent reply other threads:[~2026-10-26 10:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 10:30 Shivank Garg
2026-10-26 10:30 ` [PATCH 1/8] mm/vmstat: remove unused folio stat helpers Shivank Garg
2026-10-26 10:30 ` [PATCH 2/8] mm: remove unused folio refcount helpers Shivank Garg
2026-10-26 10:30 ` [PATCH 3/8] mm/page_ext: remove unused page_ext_iter_get() Shivank Garg
2026-10-26 10:30 ` [PATCH 4/8] mm: remove unused helpers from pagemap.h Shivank Garg
2026-10-26 10:30 ` [PATCH 5/8] mm/swapops: remove unused make_guard_swp_entry() Shivank Garg
2026-10-26 10:30 ` [PATCH 6/8] mm/swap: remove unused folio_to_swp_tb() Shivank Garg
2026-10-26 10:30 ` [PATCH 7/8] mm/zsmalloc: remove unused zpdesc_lock() Shivank Garg
2026-10-26 10:30 ` [PATCH 8/8] mm: nommu: remove unused heap_stack_gap Shivank Garg
2026-10-26 10:32 ` David Hildenbrand (Arm) [this message]
2026-10-26 11:14 ` [PATCH 0/8] mm: remove unused functions Garg, Shivank
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=8da0110d-e05a-4559-a581-44a1fe28a41f@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=baoquan.he@linux.dev \
--cc=bharata@amd.com \
--cc=bpf@vger.kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chrisl@kernel.org \
--cc=corbet@lwn.net \
--cc=damon@lists.linux.dev \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=hannes@cmpxchg.org \
--cc=harry@kernel.org \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=jannh@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kasong@tencent.com \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=muchun.song@linux.dev \
--cc=nphamcs@gmail.com \
--cc=pfalcato@suse.de \
--cc=qi.zheng@linux.dev \
--cc=riel@surriel.com \
--cc=roman.gushchin@linux.dev \
--cc=rppt@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=shakeel.butt@linux.dev \
--cc=shikemeng@huaweicloud.com \
--cc=shivankg@amd.com \
--cc=sj@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=urezki@gmail.com \
--cc=vbabka@kernel.org \
--cc=weixugc@google.com \
--cc=willy@infradead.org \
--cc=youngjun.park@lge.com \
--cc=yuanchu@google.com \
/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®