[PATCH] i386/tcg/svm: fix comma operator typo

Nicholas Mosier posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251111-i386-svm-vmexit-typo-fix-v1-1-49f0414472cd@stanford.edu
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>
target/i386/tcg/system/svm_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] i386/tcg/svm: fix comma operator typo
Posted by Nicholas Mosier 1 month ago
A comma operator inappropriately terminates an expression
in svm_helper.c. Replace it with a semicolon.

Signed-off-by: Nicholas Mosier <nmosier@stanford.edu>
---
As an apparent typo, line 742 in target/i386/tcg/system/svm_helper.c
ends with a comma operator, rather than a statement-ending semicolon.
This doesn't introduce any functionality bugs as the code is currently
written, but could easily introduce bugs in the future if a new line
of code is added following the comma operator.

This patch replaces the comma with a semicolon, as the original author
probably intended.
---
 target/i386/tcg/system/svm_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/tcg/system/svm_helper.c b/target/i386/tcg/system/svm_helper.c
index 505788b0e2..c32cc7ac30 100644
--- a/target/i386/tcg/system/svm_helper.c
+++ b/target/i386/tcg/system/svm_helper.c
@@ -742,7 +742,7 @@ void cpu_vmexit(CPUX86State *env, uint32_t exit_code, uint64_t exit_info_1,
              exit_code);
 
     x86_stq_phys(cs, env->vm_vmcb + offsetof(struct vmcb,
-                                             control.exit_info_1), exit_info_1),
+                                             control.exit_info_1), exit_info_1);
 
     /* remove any pending exception */
     env->old_exception = -1;

---
base-commit: 593aee5df98b4a862ff8841a57ea3dbf22131a5f
change-id: 20251111-i386-svm-vmexit-typo-fix-b5ce1954d254

Best regards,
-- 
Nicholas Mosier <nmosier@stanford.edu>
Re: [PATCH] i386/tcg/svm: fix comma operator typo
Posted by Paolo Bonzini 1 month ago
Queued, thanks.

Paolo
Re: [PATCH] i386/tcg/svm: fix comma operator typo
Posted by Philippe Mathieu-Daudé 1 month ago
On 11/11/25 22:57, Nicholas Mosier wrote:
> A comma operator inappropriately terminates an expression
> in svm_helper.c. Replace it with a semicolon.
> 
> Signed-off-by: Nicholas Mosier <nmosier@stanford.edu>
> ---
> As an apparent typo, line 742 in target/i386/tcg/system/svm_helper.c
> ends with a comma operator, rather than a statement-ending semicolon.
> This doesn't introduce any functionality bugs as the code is currently
> written, but could easily introduce bugs in the future if a new line
> of code is added following the comma operator.
> 
> This patch replaces the comma with a semicolon, as the original author
> probably intended.
> ---
>   target/i386/tcg/system/svm_helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>