[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/12] hw/mips/malta: Fix minor dead code issue
|
From: |
Peter Maydell |
|
Subject: |
[PULL 08/12] hw/mips/malta: Fix minor dead code issue |
|
Date: |
Fri, 12 May 2023 16:34:19 +0100 |
Coverity points out (in CID 1508390) that write_bootloader has
some dead code, where we assign to 'p' and then in the following
line assign to it again. This happened as a result of the
refactoring in commit cd5066f8618b.
Fix the dead code by removing the 'void *v' variable entirely and
instead adding a cast when calling bl_setup_gt64120_jump_kernel(), as
we do at its other callsite in write_bootloader_nanomips().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/mips/malta.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index af9021316de..e3be2eea563 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -748,7 +748,6 @@ static void write_bootloader(uint8_t *base, uint64_t
run_addr,
uint64_t kernel_entry)
{
uint32_t *p;
- void *v;
/* Small bootloader */
p = (uint32_t *)base;
@@ -785,9 +784,7 @@ static void write_bootloader(uint8_t *base, uint64_t
run_addr,
*
*/
- v = p;
- bl_setup_gt64120_jump_kernel(&v, run_addr, kernel_entry);
- p = v;
+ bl_setup_gt64120_jump_kernel((void **)&p, run_addr, kernel_entry);
/* YAMON subroutines */
p = (uint32_t *) (base + 0x800);
--
2.34.1
- [PULL 00/12] target-arm queue, Peter Maydell, 2023/05/12
- [PULL 01/12] target/arm: Move translate-a32.h, arm_ldst.h, sve_ldst_internal.h to tcg/, Peter Maydell, 2023/05/12
- [PULL 04/12] target/arm: Fix handling of SW and NSW bits for stage 2 walks, Peter Maydell, 2023/05/12
- [PULL 07/12] docs: Remove unused weirdly-named cross-reference targets, Peter Maydell, 2023/05/12
- [PULL 11/12] tests/qtest: Don't run cdrom boot tests if no accelerator is present, Peter Maydell, 2023/05/12
- [PULL 02/12] target/arm: Move helper-{a64,mve,sme,sve}.h to tcg/, Peter Maydell, 2023/05/12
- [PULL 03/12] target/arm: Don't allow stage 2 page table walks to downgrade to NS, Peter Maydell, 2023/05/12
- [PULL 05/12] MAINTAINERS: Update Akihiko Odaki's email address, Peter Maydell, 2023/05/12
- [PULL 08/12] hw/mips/malta: Fix minor dead code issue,
Peter Maydell <=
- [PULL 09/12] target/arm: Select SEMIHOSTING when using TCG, Peter Maydell, 2023/05/12
- [PULL 06/12] ui: Fix pixel colour channel order for PNG screenshots, Peter Maydell, 2023/05/12
- [PULL 10/12] target/arm: Select CONFIG_ARM_V7M when TCG is enabled, Peter Maydell, 2023/05/12
- [PULL 12/12] target/arm: Correct AArch64.S2MinTxSZ 32-bit EL1 input size check, Peter Maydell, 2023/05/12
- Re: [PULL 00/12] target-arm queue, Richard Henderson, 2023/05/13