RE: [PATCH 4/7] riscv: Simplify text patching loops
From: David Laight
Date: Mon Feb 19 2024 - 17:13:55 EST
...
> > - while (patched < len && !ret) {
> > - size = min_t(size_t, PAGE_SIZE * 2 - offset_in_page(addr + patched), len - patched);
> > - ret = __patch_insn_set(addr + patched, c, size);
> > + while (len && !ret) {
> > + size = min_t(size_t, PAGE_SIZE * 2 - offset_in_page(addr), len);
Does that need to be min_t()?
Both arguments seem to be unsigned.
(Did it even ever need to be?)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)