x86, microcode, AMD: Remove useless get_ucode_data wrapper
authorBorislav Petkov <borislav.petkov@amd.com>
Fri, 20 Jul 2012 12:12:21 +0000 (14:12 +0200)
committerH. Peter Anvin <hpa@linux.intel.com>
Wed, 22 Aug 2012 23:15:26 +0000 (16:15 -0700)
get_ucode_data was a trivial memcpy wrapper. Remove it so as not to
obfuscate code unnecessarily with no obvious gain.

No functional change.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Link: http://lkml.kernel.org/r/1344361461-10076-7-git-send-email-bp@amd64.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/include/asm/microcode.h
arch/x86/kernel/microcode_amd.c

index 4ebe157bf73db184b4e73df8f391db399fd874a7..8813be600995b4ca72315c63d0996ab7b4dbcb56 100644 (file)
@@ -49,12 +49,6 @@ static inline struct microcode_ops * __init init_intel_microcode(void)
 #ifdef CONFIG_MICROCODE_AMD
 extern struct microcode_ops * __init init_amd_microcode(void);
 extern void __exit exit_amd_microcode(void);
-
-static inline void get_ucode_data(void *to, const u8 *from, size_t n)
-{
-       memcpy(to, from, n);
-}
-
 #else
 static inline struct microcode_ops * __init init_amd_microcode(void)
 {
index 82746f942cd8db4d59a32631049a79146564052e..94213387a3d1c7dfbddbdcd1770ec7c77dba693a 100644 (file)
@@ -183,7 +183,7 @@ static int get_matching_microcode(int cpu, const u8 *ucode_ptr,
        memset(patch, 0, PAGE_SIZE);
 
        /* all looks ok, get the binary patch */
-       get_ucode_data(patch, ucode_ptr + SECTION_HDR_SIZE, actual_size);
+       memcpy(patch, ucode_ptr + SECTION_HDR_SIZE, actual_size);
 
        return actual_size;
 }
@@ -238,7 +238,7 @@ static int install_equiv_cpu_table(const u8 *buf)
                return -ENOMEM;
        }
 
-       get_ucode_data(equiv_cpu_table, buf + CONTAINER_HDR_SZ, size);
+       memcpy(equiv_cpu_table, buf + CONTAINER_HDR_SZ, size);
 
        /* add header length */
        return size + CONTAINER_HDR_SZ;