[PATCH v2 0/2] Two small patches to clean up mm/mm_slot.h

xu.xin16@zte.com.cn posted 2 patches 1 week, 5 days ago
There is a newer version of this series
mm/khugepaged.c |  6 ++----
mm/ksm.c        |  9 +++------
mm/mm_slot.h    | 22 ++++++++++++++++------
3 files changed, 21 insertions(+), 16 deletions(-)
[PATCH v2 0/2] Two small patches to clean up mm/mm_slot.h
Posted by xu.xin16@zte.com.cn 1 week, 5 days ago
From: xu xin <xu.xin16@zte.com.cn>

mm_slot.h is mainly used by THP and KSM.

Patch 1 introduces mm_slot_remove() to abstract the common
hash_del() + list_del() sequence used in both khugepaged and KSM.

Patch 2 cleans up the macro parameter names in mm_slot_lookup() and
mm_slot_insert() by removing the leading underscores, and adds a
comment explaining why they cannot be converted to static inline
functions (they rely on sizeof() on the actual array argument).

xu xin (2):
  mm/mm_slot.h: add a helper function mm_slot_remove
  mm/mm_slot.h: clean up macro parameter names in mm_slot_lookup() and
    mm_slot_insert()

 mm/khugepaged.c |  6 ++----
 mm/ksm.c        |  9 +++------
 mm/mm_slot.h    | 22 ++++++++++++++++------
 3 files changed, 21 insertions(+), 16 deletions(-)

-- 
2.25.1