Skip to contentSkip to conversation

hw/misc/applesmc: Fix a typo setting MSSD key

PATCH In review Philippe Mathieu-Daudé 3 participants 4 messages Jul 20 – Jul 21

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/misc/applesmc: Fix a typo setting MSSD key

In commit 1ddda5cd364 we meant to set MSSD=3, but due to a typo we ended setting MSSD=0. Convert the two other NATJ and MSSP keys to use hexadecimal notation to avoid similar copy/paste typos.

Fixes 1ddda5cd364 ("AppleSMC device emulation")
---
 hw/misc/applesmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/misc/applesmc.c +3 -3
index fd96f5f245f..d004e8b4431 100644
@@ -333,9 +333,9 @@ static void applesmc_isa_realize(DeviceState *dev, Error **errp)
     applesmc_add_key(s, "REV ", 6, "\x01\x13\x0f\x00\x00\x03");
     applesmc_add_key(s, "OSK0", 32, s->osk);
     applesmc_add_key(s, "OSK1", 32, s->osk + 32);
-    applesmc_add_key(s, "NATJ", 1, "\0");
-    applesmc_add_key(s, "MSSP", 1, "\0");
-    applesmc_add_key(s, "MSSD", 1, "\0x3");
+    applesmc_add_key(s, "NATJ", 1, "\x00");
+    applesmc_add_key(s, "MSSP", 1, "\x00");
+    applesmc_add_key(s, "MSSD", 1, "\x03");
 }
 
 static void applesmc_unrealize(DeviceState *dev)
Signature · 1 line
2.53.0
Reviewed-by Alexander Graf on v1 1/1
#1 lore raw
Quoted 9 lines · Philippe Mathieu-Daudé

In commit 1ddda5cd364 we meant to set MSSD=3, but due to a typo we ended setting MSSD=0. Convert the two other NATJ and MSSP keys to use hexadecimal notation to avoid similar copy/paste typos.

Fixes 1ddda5cd364 ("AppleSMC device emulation")

Funny :)

Alex

Reviewed-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 5 lines · Philippe Mathieu-Daudé

In commit 1ddda5cd364 we meant to set MSSD=3, but due to a typo we ended setting MSSD=0. Convert the two other NATJ and MSSP keys to use hexadecimal notation to avoid similar copy/paste typos.

Quoted 8 lines
Fixes 1ddda5cd364 ("AppleSMC device emulation")
---
 hw/misc/applesmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
#3 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 5 lines · Philippe Mathieu-Daudé

In commit 1ddda5cd364 we meant to set MSSD=3, but due to a typo we ended setting MSSD=0. Convert the two other NATJ and MSSP keys to use hexadecimal notation to avoid similar copy/paste typos.

Quoted 7 lines
Fixes 1ddda5cd364 ("AppleSMC device emulation")
---
  hw/misc/applesmc.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

Patch queued, thanks.