[U-Boot] [PATCH 03/14] tegra: Add crypto library for warmboot code

Mike Frysinger vapier at gentoo.org
Sun Jan 8 06:51:38 CET 2012


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 ?
-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/20120108/022ecb01/attachment.pgp>


More information about the U-Boot mailing list