[U-Boot] [PATCH v3 06/11] arm:reset: call the reset_misc() before the cpu reset

Jeroen Hofstee jeroen at myspectrum.nl
Mon Jun 30 20:30:27 CEST 2014


Hello Przemyslaw.

[...]
>>>>>
>>>>>   #include <common.h>
>>>>>
>>>>> +void __reset_misc(void) {}
>>>>> +
>>>>> +void reset_misc(void)
>>>>> +    __attribute((weak, alias("__reset_misc")));
>>>>> +
>> can you please use __weak here and provide a prototype, wherever it
>> ends up in the end. It prevents 3 warnings and makes it type safe..
>>
>
> Thanks, I will add the __weak prefix there.
>
thanks
> The prototype of this new function is in file common.h,
> so this is type safe.
>
yup, I see, don't know how I missed that.
> I checked the compilation with options: -W and -pedantic
> on two configs: trats and odroid, and there was no warnings about the 
> function reset_misc.
>
You won't see the warning with -Wall -Wpendantic, but when running make W=1,
which adds -Wmissing-declarations. The alias version typically warns 
with something
like __reset_misc has no previous declaration. That is useful at times,
since it would e.g. complain about [1].

Regards,
Jeroen

[1] http://lists.denx.de/pipermail/u-boot/2014-June/182781.html




More information about the U-Boot mailing list