Patchwork [U-Boot,15/20] image: Use crc header file instead of C prototypes

login
register
mail settings
Submitter Simon Glass
Date Dec. 26, 2012, 6:57 p.m.
Message ID <1356548233-5570-16-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/208202/
State Superseded, archived
Delegated to: Simon Glass
Headers show

Comments

Simon Glass - Dec. 26, 2012, 6:57 p.m.
We have an existing header which the crc32 definitions, so use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 common/image.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Marek Vasut - Dec. 26, 2012, 10:02 p.m.
Dear Simon Glass,

> We have an existing header which the crc32 definitions, so use it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Looks ok.

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
Simon Glass - Feb. 15, 2013, 11:56 p.m.
On Wed, Dec 26, 2012 at 2:02 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Simon Glass,
>
>> We have an existing header which the crc32 definitions, so use it.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Looks ok.
>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to x86/master.

>
> Best regards,
> Marek Vasut

Patch

diff --git a/common/image.c b/common/image.c
index 95498e6..936b08c 100644
--- a/common/image.c
+++ b/common/image.c
@@ -75,6 +75,8 @@  static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch,
 #include <image.h>
 #endif /* !USE_HOSTCC*/
 
+#include <u-boot/crc.h>
+
 static const table_entry_t uimage_arch[] = {
 	{	IH_ARCH_INVALID,	NULL,		"Invalid ARCH",	},
 	{	IH_ARCH_ALPHA,		"alpha",	"Alpha",	},
@@ -161,8 +163,6 @@  static const table_entry_t uimage_comp[] = {
 	{	-1,		"",		"",			},
 };
 
-uint32_t crc32(uint32_t, const unsigned char *, uint);
-uint32_t crc32_wd(uint32_t, const unsigned char *, uint, uint);
 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE) || defined(USE_HOSTCC)
 static void genimg_print_time(time_t timestamp);
 #endif