diff mbox series

[v2,3/4] x86/microcode: use const qualifier for microcode buffer

Message ID 3c4b61a2888f01b9344fd302603c56a8739a1c71.1576630344.git.elnikety@amazon.com (mailing list archive)
State New, archived
Headers show
Series x86/microcode: Support builtin CPU microcode | expand

Commit Message

Eslam Elnikety Dec. 18, 2019, 1:32 a.m. UTC
The buffer holding the microcode bits should be marked as const.

Signed-off-by: Eslam Elnikety <elnikety@amazon.com>
---
 xen/arch/x86/microcode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jan Beulich Dec. 18, 2019, 12:07 p.m. UTC | #1
On 18.12.2019 02:32, Eslam Elnikety wrote:
> 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>
diff mbox series

Patch

diff --git a/xen/arch/x86/microcode.c b/xen/arch/x86/microcode.c
index c878fc71ff..4616fa9d2e 100644
--- a/xen/arch/x86/microcode.c
+++ b/xen/arch/x86/microcode.c
@@ -86,7 +86,7 @@  static enum {
  * memory.
  */
 struct ucode_mod_blob {
-    void *data;
+    const void *data;
     size_t size;
 };
 
@@ -744,7 +744,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;