On Wednesday, August 31, 2011 18:20:56 Andrew Murray wrote:
> +#if defined(CONFIG_BOOT_TRACE)
> +#define DO_INITCALL(x, ...) \
> +     do { \
> +             printf("calling  0x%pF\n", x); \
> +             (x)(__VA_ARGS__); \
> +             printf("initcall 0x%pF returned\n", x); \
> +     } while (0)

are there any void initcalls ?  or just ones where you ignore the value ?  
otherwise we can simply rename DO_INITCALL_RET() to DO_INITCALL().

> +#define DO_INITCALL_RET(x, ret, ...) \
> +     do { \
> +             printf("calling  0x%pF\n", x); \
> +             ret = (x)(__VA_ARGS__); \
> +             printf("initcall 0x%pF returned\n", x); \
> +     } while (0)

#define DO_INITCALL_RET(x, ...) \
        ({ \
                int __ret; \
                printf("calling  0x%pF\n", x); \
                __ret = (x)(__VA_ARGS__); \
                printf("initcall 0x%pF returned\n", x); \
                __ret; \
        })
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to