Re: [PATCH v4 3/4] kho: add support for preserving vmalloc allocations
From: Jason Gunthorpe
Date: Wed Sep 17 2025 - 17:22:16 EST
On Wed, Sep 17, 2025 at 02:15:28PM -0700, Andrew Morton wrote:
> On Wed, 17 Sep 2025 20:40:32 +0300 Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> > +struct kho_vmalloc_chunk;
> > +struct kho_vmalloc {
> > + DECLARE_KHOSER_PTR(first, struct kho_vmalloc_chunk *);
>
> offtopic nit: DECLARE_KHOSER_PTR() *defines* a union named "first". It
> doesn't declare one. A better name for this would have been DEFINE_...
It declares a *member* of the struct, in the same manner as the usual
DECLARE_* macros do.. Yes that member is an anonymous union that is
also created by the macro, but the main point is to add a member to
the struct.
Jason