qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/i386: Remove dead assignment to ss in do_interrupt64(


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] target/i386: Remove dead assignment to ss in do_interrupt64()
Date: Wed, 24 Jul 2024 08:57:35 +0200
User-agent: Mozilla Thunderbird

On 23/7/24 18:25, Peter Maydell wrote:
Coverity points out that in do_interrupt64() in the "to inner
privilege" codepath we set "ss = 0", but because we also set
"new_stack = 1" there, later in the function we will always override
that value of ss with "ss = 0 | dpl".

Remove the unnecessary initialization of ss, which allows us to
reduce the scope of the variable to only where it is used.  Borrow a
comment from helper_lcall_protected() that explains what "0 | dpl"
means here.

Resolves: Coverity CID 1527395
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  target/i386/tcg/seg_helper.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]