Re: [PATCH 2/2] mm: huge_memory: refactor defrag_show() to use defrag_flags[]
From: Lance Yang
Date: Fri Apr 03 2026 - 01:17:21 EST
On 2026/3/21 00:05, Breno Leitao wrote:
Replace the hardcoded if/else chain of test_bit() calls and string
literals in defrag_show() with a loop over defrag_flags[] and
defrag_mode_strings[] arrays introduced in the previous commit.
This makes defrag_show() consistent with defrag_store() and eliminates
the duplicated mode name strings.
Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
---
LGTM.
Tested-by: Lance Yang <lance.yang@xxxxxxxxx>
And also,
Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>