mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-21 22:47:51 -04:00
arm64: patching: replace min_t with min in __text_poke
Use the simpler min() macro since both values are unsigned and compatible. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
32e4c96d6a
commit
6c2ccb4979
@@ -116,8 +116,7 @@ static void *__text_poke(text_poke_f func, void *addr, void *src, size_t len)
|
||||
|
||||
while (patched < len) {
|
||||
ptr = addr + patched;
|
||||
size = min_t(size_t, PAGE_SIZE - offset_in_page(ptr),
|
||||
len - patched);
|
||||
size = min(PAGE_SIZE - offset_in_page(ptr), len - patched);
|
||||
|
||||
waddr = patch_map(ptr, FIX_TEXT_POKE0);
|
||||
func(waddr, src, patched, size);
|
||||
|
||||
Reference in New Issue
Block a user