From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 31 Aug 2011 18:50:39 -0400 Subject: [U-Boot] [PATCH 2/7] Add macros for recording init calls during UBoot execution In-Reply-To: <1314829261-13996-3-git-send-email-amurray@theiet.org> References: <1314829261-13996-1-git-send-email-amurray@theiet.org> <1314829261-13996-3-git-send-email-amurray@theiet.org> Message-ID: <201108311850.40205.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 -------------- 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/20110831/61532e77/attachment.pgp