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: Richard Henderson
Subject: Re: [PATCH] target/i386: Remove dead assignment to ss in do_interrupt64()
Date: Wed, 24 Jul 2024 10:01:26 +1000
User-agent: Mozilla Thunderbird

On 7/24/24 02: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: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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