From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 8 Jan 2012 08:42:28 -0800 Subject: [U-Boot] [PATCH 03/14] tegra: Add crypto library for warmboot code In-Reply-To: <201201080051.39905.vapier@gentoo.org> References: <1324927987-13100-1-git-send-email-sjg@chromium.org> <1324927987-13100-4-git-send-email-sjg@chromium.org> <201201080051.39905.vapier@gentoo.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mike, On Sat, Jan 7, 2012 at 9:51 PM, Mike Frysinger wrote: > On Monday 26 December 2011 14:32:56 Simon Glass wrote: >> --- /dev/null >> +++ b/arch/arm/cpu/armv7/tegra2/crypto.c >> >> +#ifdef DEBUG >> +static void debug_print_vector(char *name, u32 num_bytes, u8 *data) >> +{ >> + ? ? u32 i; >> + >> + ? ? printf("%s [%d] @0x%08x", name, num_bytes, (u32)data); >> + ? ? for (i = 0; i < num_bytes; i++) { >> + ? ? ? ? ? ? if (i % 16 == 0) >> + ? ? ? ? ? ? ? ? ? ? printf(" = "); >> + ? ? ? ? ? ? printf("%02x", data[i]); >> + ? ? ? ? ? ? if ((i+1) % 16 != 0) >> + ? ? ? ? ? ? ? ? ? ? printf(" "); >> + ? ? } >> + ? ? printf("\n"); >> +} >> +#else >> +#define debug_print_vector(name, num_bytes, data) >> +#endif > > if you used debug() instead of printf(), wouldn't this get optimized without > the #ifdef protection ? Yes it does, clever compiler. I will change it. Regards Simon > -mike