Hi Andy, > -----Original Message----- > From: Andy Shevchenko [mailto:[email protected]] > Sent: Friday, July 26, 2019 7:30 PM > To: Park, Aiden <[email protected]> > Cc: Bin Meng <[email protected]>; U-Boot Mailing List <u- > [email protected]>; Simon Glass <[email protected]> > Subject: Re: [PATCH v6 3/8] x86: slimbootloader: Add memory configuration > > On Fri, Jul 26, 2019 at 10:00 AM Park, Aiden <[email protected]> wrote: > > > > Slim Bootloader provides memory map info thru its HOB list pointer. > > Configure memory size and relocation memory from the HOB data, and > > provide e820 entries as well. > > - Get memory size from the memory map info HOB > > - Set available top memory lower than 4GB for U-Boot relocation > > - Provide e820 entries from the memory map info HOB > > > > +#define while_each_memory_map_entry_reversed(iter, entries) \ > > + (iter) = (entries)->count; \ > > + while ((iter)--) \ > > + if ((entries)->entry[(iter)].type != E820_RAM) \ > > + continue; \ > > + else \ > > In case of macro it's better to go with for-loop. > Also, no need to have parenthesis around iterator (we expect it to be plain > variable. > continue can be replaced with {}. > > See, for wxample, > https://elixir.bootlin.com/linux/latest/source/include/linux/pci.h#L634 > Thanks for giving better reference. Let me update this as your suggestion.
> > + > > +DECLARE_GLOBAL_DATA_PTR; > > + > > And move the macro definition closer to its first use. > Let me move the macro before its first use. > -- > With Best Regards, > Andy Shevchenko Best Regards, Aiden _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

