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

Philippe Mathieu-Daudé posted 1 patch 4 days, 22 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260720115336.75063-1-philmd@oss.qualcomm.com
hw/misc/applesmc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH] hw/misc/applesmc: Fix a typo setting MSSD key
Posted by Philippe Mathieu-Daudé 4 days, 22 hours ago
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.

Cc: qemu-stable@nongnu.org
Fixes: 1ddda5cd364 ("AppleSMC device emulation")
Reported-by: Matthew Jackson <matthew@pq.io>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
 hw/misc/applesmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c
index fd96f5f245f..d004e8b4431 100644
--- a/hw/misc/applesmc.c
+++ b/hw/misc/applesmc.c
@@ -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)
-- 
2.53.0


Re: [PATCH] hw/misc/applesmc: Fix a typo setting MSSD key
Posted by Philippe Mathieu-Daudé 4 days ago
On 20/7/26 13:53, Philippe Mathieu-Daudé wrote:
> 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.
> 
> Cc: qemu-stable@nongnu.org
> Fixes: 1ddda5cd364 ("AppleSMC device emulation")
> Reported-by: Matthew Jackson <matthew@pq.io>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> ---
>   hw/misc/applesmc.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)

Patch queued, thanks.

Re: [PATCH] hw/misc/applesmc: Fix a typo setting MSSD key
Posted by Pierrick Bouvier 4 days, 12 hours ago
On 7/20/2026 4:53 AM, Philippe Mathieu-Daudé wrote:
> 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.
> 
> Cc: qemu-stable@nongnu.org
> Fixes: 1ddda5cd364 ("AppleSMC device emulation")
> Reported-by: Matthew Jackson <matthew@pq.io>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> ---
>  hw/misc/applesmc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

Re: [PATCH] hw/misc/applesmc: Fix a typo setting MSSD key
Posted by Graf (AWS), Alexander 4 days, 12 hours ago
On 20.07.26 13:53, Philippe Mathieu-Daudé wrote:
> 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.
>
> Cc: qemu-stable@nongnu.org
> Fixes: 1ddda5cd364 ("AppleSMC device emulation")
> Reported-by: Matthew Jackson <matthew@pq.io>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


Funny :)

Reviewed-by: Alexander Graf <agraf@csgraf.de>


Alex