x86, microcode rework, v2, renaming
authorPeter Oruba <peter.oruba@amd.com>
Wed, 17 Sep 2008 13:05:52 +0000 (15:05 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 23 Sep 2008 14:12:59 +0000 (16:12 +0200)
Renaming based on patch from Dmitry Adamushko.

Made code more readable by renaming define and variables related
to microcode _container_file_ header to make it distinguishable from
microcode _patch_ header.

Signed-off-by: Peter Oruba <peter.oruba@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/microcode_amd.c

index 03ea4e52e87a0a968f14f03a3a87fbbebdc0ffe3..62058e9c8b4ed9951468a8ca91815aeb948e30e6 100644 (file)
@@ -304,12 +304,12 @@ static void * get_next_ucode(u8 *buf, unsigned int size,
 static int install_equiv_cpu_table(u8 *buf,
                int (*get_ucode_data)(void *, const void *, size_t))
 {
-#define UCODE_HEADER_SIZE      12
-       u8 *hdr[UCODE_HEADER_SIZE];
-       unsigned int *buf_pos = (unsigned int *)hdr;
+#define UCODE_CONTAINER_HEADER_SIZE    12
+       u8 *container_hdr[UCODE_CONTAINER_HEADER_SIZE];
+       unsigned int *buf_pos = (unsigned int *)container_hdr;
        unsigned long size;
 
-       if (get_ucode_data(&hdr, buf, UCODE_HEADER_SIZE))
+       if (get_ucode_data(&container_hdr, buf, UCODE_CONTAINER_HEADER_SIZE))
                return 0;
 
        size = buf_pos[2];
@@ -326,14 +326,14 @@ static int install_equiv_cpu_table(u8 *buf,
                return 0;
        }
 
-       buf += UCODE_HEADER_SIZE;
+       buf += UCODE_CONTAINER_HEADER_SIZE;
        if (get_ucode_data(equiv_cpu_table, buf, size)) {
                vfree(equiv_cpu_table);
                return 0;
        }
 
-       return size + UCODE_HEADER_SIZE; /* add header length */
-#undef UCODE_HEADER_SIZE
+       return size + UCODE_CONTAINER_HEADER_SIZE; /* add header length */
+#undef UCODE_CONTAINER_HEADER_SIZE
 }
 
 static void free_equiv_cpu_table(void)