[U-Boot] [PATCH v2 2/7] Add macros for recording init calls during UBoot execution
Mike Frysinger
vapier at gentoo.org
Sun Sep 18 04:16:26 CEST 2011
On Saturday, September 10, 2011 09:17:28 Andrew Murray wrote:
> +#else
> +#define DO_INITCALL(x, ...) \
> + ({ (x)(__VA_ARGS__); })
this should be do{}while(0) to avoid differences in behavior with the other
DO_INITCALL() helper
> +#define DO_INITCALL_END(x) \
> + do { \
> + printf_boot_trace("initcall 0x%pF returned\n", x); \
> + } while (0)
> ...
> +#define DO_INITCALL_END(x)
seems like these should be merged so that dead code isnt caught in the middle
#ifdef CONFIG_BOOT_TRACE
# define _BOOT_TRACE 1
#else
# define _BOOT_TRACE 0
#endif
#define DO_INITCALL_END(x) \
do { \
if (_BOOT_TRACE) \
printf_boot_trace("initcall 0x%pF returned\n", x); \
} while (0)
although, if printf_boot_trace() itself had CONFIG_BOOT_TRACE logic in it, you
wouldnt have to have DO_INITCALL_END() take care of wrapping things ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110917/e18904fc/attachment.pgp
More information about the U-Boot
mailing list