[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjXY78yyGE4VEqiUix9NU0tZTBDO=DqEeSyJgBwVZ+Q=g@mail.gmail.com>
Date: Thu, 6 May 2021 09:26:06 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Palmer Dabbelt <palmer@...belt.com>
Cc: linux-riscv@...ts.infradead.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] RISC-V Patches for the 5.13 Merge Window, Part 1
On Wed, May 5, 2021 at 10:51 PM Palmer Dabbelt <palmer@...belt.com> wrote:
>
> Here are my conflict resolutions, if that helps:
I think you've unnecessarily done that "+1" twice:
> + /* + 1 as memblock_alloc() might increase memblock.reserved.cnt */
> + num_resources = memblock.memory.cnt + memblock.reserved.cnt + 1;
> + res_idx = num_resources - 1;
>
> - mem_res_sz = num_resources * sizeof(*mem_res);
> + /* + 1 as memblock_alloc() might increase memblock.reserved.cnt */
> + mem_res_sz = (memblock.memory.cnt + memblock.reserved.cnt + 1) * sizeof(*mem_res);
> mem_res = memblock_alloc(mem_res_sz, SMP_CACHE_BYTES);
> if (!mem_res)
> panic("%s: Failed to allocate %zu bytes\n", __func__, mem_res_sz);
and I kept that as just the first one.
Linus
Powered by blists - more mailing lists