diff options
| author | Zheng Yejian <[email protected]> | 2024-10-22 08:39:27 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-11-07 04:11:18 +0000 |
| commit | 477327e10639a1ec5698847030b494dc75de33e4 (patch) | |
| tree | 4c29aecabb746429412e447b634654c78c955603 /arch/powerpc/lib/code-patching.c | |
| parent | mm/damon/vaddr: fix issue in damon_va_evenly_split_region() (diff) | |
| download | kernel-477327e10639a1ec5698847030b494dc75de33e4.tar.gz kernel-477327e10639a1ec5698847030b494dc75de33e4.zip | |
mm/damon/vaddr: add 'nr_piece == 1' check in damon_va_evenly_split_region()
As discussed in [1], damon_va_evenly_split_region() is called to
size-evenly split a region into 'nr_pieces' small regions,
when nr_pieces == 1, no actual split is required. Check that case
for better code readability and add a simple kunit testcase.
[1] https://lore.kernel.org/all/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Zheng Yejian <[email protected]>
Reviewed-by: SeongJae Park <[email protected]>
Cc: Fernand Sieber <[email protected]>
Cc: Leonard Foerster <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Ye Weihua <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions
