Re: [PATCH v3 2/2] mm/mm_slot.h: add comments for mm_slot_lookup/insert

From: Barry Song

Date: Mon Jul 13 2026 - 21:37:50 EST


On Tue, Jul 14, 2026 at 9:28 AM <xu.xin16@xxxxxxxxxx> wrote:
>
> From: xu xin <xu.xin16@xxxxxxxxxx>
>
> mm_slot_lookup() and mm_slot_insert() are the only helpers in
> this header that are implemented as macros rather than static inline
> functions. This may look inconsistent without explanation.
>
> Explain they must be macros because hash_for_each_possible()
> needs the table as an array (for sizeof), not a pointer.
>
> Signed-off-by: xu xin <xu.xin16@xxxxxxxxxx>

Thanks!

Reviewed-by: Barry Song <baohua@xxxxxxxxxx>