[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <198af54d-10da-4320-9623-85dfb102f5de@sifive.com>
Date: Wed, 27 Mar 2024 10:12:34 -0500
From: Samuel Holland <samuel.holland@...ive.com>
To: David Laight <David.Laight@...LAB.COM>
Cc: "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
'Björn Töpel' <bjorn@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>
Subject: Re: [PATCH 4/7] riscv: Simplify text patching loops
Hi David,
On 2024-02-19 4:13 PM, David Laight wrote:
> ...
>>> - 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?)
You're right, this never needed min_t(). I'll update this for v2.
Regards,
Samuel
Powered by blists - more mailing lists