[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCXR7_ou6QB-YArC@gmail.com>
Date: Thu, 15 May 2025 13:37:19 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Andy Shevchenko <andy@...nel.org>
Cc: linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...nel.org>,
Borislav Petkov <bp@...en8.de>, Juergen Gross <jgross@...e.com>,
"H . Peter Anvin" <hpa@...or.com>,
Kees Cook <keescook@...omium.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mike Rapoport <rppt@...nel.org>,
Paul Menzel <pmenzel@...gen.mpg.de>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
David Woodhouse <dwmw@...zon.co.uk>
Subject: Re: [PATCH 17/29] x86/boot/e820: Standardize e820 table index
variable names under 'idx'
* Andy Shevchenko <andy@...nel.org> wrote:
> ...
>
> > + for (idx = 0; idx < overlap_entries; idx++) {
> > + if (overlap_list[idx] == change_point[chg_idx]->entry)
> > + overlap_list[idx] = overlap_list[overlap_entries-1];
>
> overlap_entries - 1 ?
See:
https://lore.kernel.org/r/aCW-qKOYJWRLYgpx@gmail.com
> ...
>
> > + while (--idx >= 0) {
>
> while (idx--) {
>
> should work as well, no?
Yeah, but note that this function gets thoroughly reworked in:
x86/boot/e820: Make sure e820_search_gap() finds all gaps
and the while loop is transformed to a straightforward for loop:
+ for (idx = 0; idx < e820_table->nr_entries; idx++) {
Thanks,
Ingo
Powered by blists - more mailing lists