Re: [PATCH] sparc64: Define p4d_page() instead of stubbing it to NULL

From: Nathan Chancellor

Date: Wed Oct 07 2026 - 07:44:51 EST


On Tue, Oct 06, 2026 at 05:00:30PM -0700, Rosen Penev wrote:
> LLM suggests as an alternative:
>
> /* sparc64 has no p4d leaf mappings, so this is never called */
> static inline struct page *p4d_page(p4d_t p4d)
> {
> return NULL;
> }
>
> Not sure how to proceed.

That seems like a more reasonable fix to me, as it is still obvious this
is not supported while hiding the NULL value from clang's frontend that
emits the warning. It could be worth a comment that it is an inline
function and not a macro to avoid the warning but I guess that is up to
the sparc maintainers.

--
Cheers,
Nathan