summaryrefslogtreecommitdiffstats
path: root/lib/gen_crc32table.c
diff options
context:
space:
mode:
authorBob Pearson <rpearson@systemfabricworks.com>2012-03-23 15:02:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 16:58:37 -0700
commit60e58d5c9d8d698600e8ccb44b5a13cf99d0d90f (patch)
tree81912b32deaf6edf23a00f0f92f82efa95f6af52 /lib/gen_crc32table.c
parent3863ef31dcf04f977a94402348fec06179db58e0 (diff)
crc32: miscellaneous cleanups
Misc cleanup of lib/crc32.c and related files. - remove unnecessary header files. - straighten out some convoluted ifdef's - rewrite some references to 2 dimensional arrays as 1 dimensional arrays to make them correct. I.e. replace tab[i] with tab[0][i]. - a few trivial whitespace changes - fix a warning in gen_crc32tables.c caused by a mismatch in the type of the pointer passed to output table. Since the table is only used at kernel compile time, it is simpler to make the table big enough to hold the largest column size used. One cannot make the column size smaller in output_table because it has to be used by both the le and be tables and they can have different column sizes. [djwong@us.ibm.com: Minor changelog tweaks] Signed-off-by: Bob Pearson <rpearson@systemfabricworks.com> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/gen_crc32table.c')
-rw-r--r--lib/gen_crc32table.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gen_crc32table.c b/lib/gen_crc32table.c
index 85d0e412a04..eced7696eb7 100644
--- a/lib/gen_crc32table.c
+++ b/lib/gen_crc32table.c
@@ -7,8 +7,8 @@
#define LE_TABLE_SIZE (1 << CRC_LE_BITS)
#define BE_TABLE_SIZE (1 << CRC_BE_BITS)
-static uint32_t crc32table_le[4][LE_TABLE_SIZE];
-static uint32_t crc32table_be[4][BE_TABLE_SIZE];
+static uint32_t crc32table_le[4][256];
+static uint32_t crc32table_be[4][256];
/**
* crc32init_le() - allocate and initialize LE table data
@@ -62,7 +62,7 @@ static void crc32init_be(void)
}
}
-static void output_table(uint32_t table[4][256], int len, char *trans)
+static void output_table(uint32_t (*table)[256], int len, char *trans)
{
int i, j;