]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: patching: replace min_t with min in __text_poke
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 31 May 2026 22:08:16 +0000 (00:08 +0200)
committerWill Deacon <will@kernel.org>
Wed, 3 Jun 2026 20:15:24 +0000 (21:15 +0100)
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>
arch/arm64/kernel/patching.c

index 1041bc67a3eee0b1bb02a55ff256ca1aa05466e0..09f019c6547a0c95941e5b7a3d5f5a0cafacbfba 100644 (file)
@@ -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);