]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86/microcode: use const qualifier for microcode buffer
authorEslam Elnikety <elnikety@amazon.com>
Fri, 24 Jan 2020 09:31:55 +0000 (10:31 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 Jan 2020 09:31:55 +0000 (10:31 +0100)
The buffer holding the microcode bits should be marked as const.

Signed-off-by: Eslam Elnikety <elnikety@amazon.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/microcode.c

index 844a33bbd67c7c2cdbef7c44df102bbcae9ad050..71e881b24377852897e41394213060ff5162dc06 100644 (file)
@@ -86,7 +86,7 @@ static enum {
  * memory.
  */
 struct ucode_mod_blob {
-    void *data;
+    const void *data;
     size_t size;
 };
 
@@ -749,7 +749,7 @@ int microcode_update_one(bool start_update)
 int __init early_microcode_update_cpu(void)
 {
     int rc = 0;
-    void *data = NULL;
+    const void *data = NULL;
     size_t len;
     struct microcode_patch *patch;