[PATCH v1 3/4] x86: cpu: Add a few prototypes to the header file
Simon Glass
sjg at chromium.org
Fri Oct 18 16:55:00 CEST 2024
Hi Andy,
On Fri, 18 Oct 2024 at 05:43, Andy Shevchenko
<andriy.shevchenko at linux.intel.com> wrote:
>
> On Thu, Oct 17, 2024 at 04:11:48PM -0700, Simon Glass wrote:
> > On Wed, 9 Oct 2024 at 08:08, Andy Shevchenko
> > <andriy.shevchenko at linux.intel.com> wrote:
> > > On Tue, Oct 08, 2024 at 07:55:33PM -0600, Simon Glass wrote:
> > > > On Sat, 5 Oct 2024 at 13:14, Andy Shevchenko
> > > > <andriy.shevchenko at linux.intel.com> wrote:
> > > > >
> > > > > The compiler is not happy to have no prototypes for the functions that
> > > > > are not defined static. Add them. This helps avoiding the compiler warnings:
> > > > >
> > > > > arch/x86/cpu/cpu.c:197:13: warning: no previous prototype for ‘board_final_init’ [-Wmissing-prototypes]
> > > > > arch/x86/cpu/cpu.c:205:13: warning: no previous prototype for ‘board_final_cleanup’ [-Wmissing-prototypes]
> > > > > arch/x86/cpu/cpu.c:307:5: warning: no previous prototype for ‘reserve_arch’ [-Wmissing-prototypes]
> > > >
> > > > Reviewed-by: Simon Glass <sjg at chromium.org>
> > >
> > > Thanks!
> > >
> > > > OK, but could you add proper comments for these?
> > >
> > > Any proposed texts for them? The comments were out of scope of my patch,
> > > but I may add anything that is provided as a template.
> >
> > I found some comments in one of the files, so you could use these as a
> > base. Whenever you change code, you should make sure it has function
> > comments, follows style, etc. That way things slowly get better.
> >
> > /*
> > * Implement a weak default function for boards that need to do some final init
> > * before the system is ready.
> > */
> > __weak void board_final_init(void)
> > {
> > }
> >
> > /*
> > * Implement a weak default function for boards that need to do some final
> > * processing before booting the OS.
> > */
> > __weak void board_final_cleanup(void)
> > {
> > }
> >
> > Applied to u-boot-dm, thanks!
>
> Thanks, but what does it mean to me? Should I send an update to add the comments?
Yes, please. I'm just tidying up some x86 patches while Bin is away.
Regards,
Simon
More information about the U-Boot
mailing list