fimc-is: Fix CRC32 code for arm64
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 16 Jul 2015 08:59:37 +0000 (10:59 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 27 Apr 2018 08:25:07 +0000 (10:25 +0200)
Fix getCRC() function return type.

Change-Id: I4aab3b97d3ff2b35aaa5cef10ad06bc6301292f2
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/media/platform/exynos/fimc-is/crc32.c
drivers/media/platform/exynos/fimc-is/crc32.h

index 5aae140f3915a80fec0650b05236c92adbf97206..5a0d80e83fb4e2880a48fa22d89b6de3aaf7acb2 100644 (file)
@@ -14,9 +14,9 @@
 
 /* #define DEBUG_CRC */
 
-static void makeCRCtable(unsigned long *table, unsigned long id)
+static void makeCRCtable(unsigned int *table, unsigned int id)
 {
-       unsigned long i, j, k;
+       unsigned int i, j, k;
 
        for(i = 0; i < 256; ++i) {
                k = i;
@@ -32,16 +32,16 @@ static void makeCRCtable(unsigned long *table, unsigned long id)
        }
 }
 
-unsigned long getCRC(volatile unsigned short *mem, signed long count,
+static unsigned int table[256];
+
+unsigned int getCRC(volatile unsigned short *mem, signed long count,
        volatile unsigned short *crcH, volatile unsigned short *crcL)
 {
        unsigned char mem0, mem1;
        int i;
-       unsigned long CRC = 0;
-#ifndef DEBUG_CRC
-       unsigned long table[256];
-#else
-       unsigned long table[256] = {
+       unsigned int CRC = 0;
+#ifdef DEBUG_CRC
+       unsigned int table[256] = {
                0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
                0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
                0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
index 324793ccee59c69feee38b3d081065542802b0d8..74911ac81af3ff3897566121e4340f0a0643f05d 100644 (file)
@@ -13,7 +13,7 @@
 #define CRC32_H
 
 /* unit of count is 2byte */
-unsigned long getCRC(volatile unsigned short *mem, signed long count,
+unsigned int getCRC(volatile unsigned short *mem, signed long count,
        volatile unsigned short *crcH, volatile unsigned short *crcL);
 
 #endif