diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-29 17:44:43 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2024-03-12 11:46:16 +0100 |
commit | ee1004bba6eadeddf988a29716dc28849c0211c8 (patch) | |
tree | 6c7373918fe1ddf1db3973400105b99b84c4fdaf /target/m68k | |
parent | 46ff64a826bbd70e98484c8c7f4c3c1d83363f1d (diff) | |
download | qemu-ee1004bba6eadeddf988a29716dc28849c0211c8.zip qemu-ee1004bba6eadeddf988a29716dc28849c0211c8.tar.gz qemu-ee1004bba6eadeddf988a29716dc28849c0211c8.tar.bz2 |
bulk: Access existing variables initialized to &S->F when available
When a variable is initialized to &struct->field, use it
in place. Rationale: while this makes the code more concise,
this also helps static analyzers.
Mechanical change using the following Coccinelle spatch script:
@@
type S, F;
identifier s, m, v;
@@
S *s;
...
F *v = &s->m;
<+...
- &s->m
+ v
...+>
Inspired-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240129164514.73104-2-philmd@linaro.org>
Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
[thuth: Dropped hunks that need a rebase, and fixed sizeof() in pmu_realize()]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/m68k')
-rw-r--r-- | target/m68k/helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 1c33995..44b2458 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -984,7 +984,7 @@ bool m68k_cpu_tlb_fill(CPUState *cs, vaddr address, int size, access_type |= ACCESS_SUPER; } - ret = get_physical_address(&cpu->env, &physical, &prot, + ret = get_physical_address(env, &physical, &prot, address, access_type, &page_size); if (likely(ret == 0)) { tlb_set_page(cs, address & TARGET_PAGE_MASK, |