mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 07:02:03 -06:00
target/loongarch: Remove unnecessary temporary variable assignment
Temporary variable ret is assigned at last line and return, it can be removed and return directly. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250320032158.1762751-6-maobibo@loongson.cn> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
0973b505fa
commit
daf78a9d51
1 changed files with 2 additions and 3 deletions
|
@ -543,7 +543,7 @@ target_ulong helper_lddir(CPULoongArchState *env, target_ulong base,
|
|||
target_ulong level, uint32_t mem_idx)
|
||||
{
|
||||
CPUState *cs = env_cpu(env);
|
||||
target_ulong badvaddr, index, phys, ret;
|
||||
target_ulong badvaddr, index, phys;
|
||||
uint64_t dir_base, dir_width;
|
||||
|
||||
if (unlikely((level == 0) || (level > 4))) {
|
||||
|
@ -571,8 +571,7 @@ target_ulong helper_lddir(CPULoongArchState *env, target_ulong base,
|
|||
get_dir_base_width(env, &dir_base, &dir_width, level);
|
||||
index = (badvaddr >> dir_base) & ((1 << dir_width) - 1);
|
||||
phys = base | index << 3;
|
||||
ret = ldq_phys(cs->as, phys) & TARGET_PHYS_MASK;
|
||||
return ret;
|
||||
return ldq_phys(cs->as, phys) & TARGET_PHYS_MASK;
|
||||
}
|
||||
|
||||
void helper_ldpte(CPULoongArchState *env, target_ulong base, target_ulong odd,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue