From nobody Fri Dec 19 14:30:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683905810; cv=none; d=zohomail.com; s=zohoarc; b=hbWpZqNwqj6/WEJHm5CctTbItbPJQS4HkAfYNx8ZuQPFkoAK/xTiCN8/+eZtB5fkMu95eA4B5xkWvrwlDRDpUluEF3nH8VrzNiptjq/fNgv84vBTnChY1n1utWtq7xuRku99NJ0tYHtGEW4QDGqHLuf8JxxEMipysLpQrTh1udg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683905810; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kjK9aJrCfxZTneunS8eCzgZ7hBHA0FsCr6nfpvU0y2M=; b=VeXHG/oxpgUOvgRVBK5UKP7jrYeYf189uEPjBRvplBktNPAR6xOrzpR/A241CsZR+qT9TnGFlph/MmeIFKp+1X/c3pWG4DYltNlY9rIjHW7cZ0OGtSIXVTjrxmQTq/dsjAq6W1eo9aD9X/KnTUNlVqMPUjziaWyu2AytTO2LlOg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683905810091873.917581472792; Fri, 12 May 2023 08:36:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxUmy-0003JY-Mk; Fri, 12 May 2023 11:34:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxUmw-0003IB-Ou for qemu-devel@nongnu.org; Fri, 12 May 2023 11:34:34 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxUmu-000614-Om for qemu-devel@nongnu.org; Fri, 12 May 2023 11:34:34 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3063208beedso9650972f8f.1 for ; Fri, 12 May 2023 08:34:30 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id b6-20020adfee86000000b002feea065cc9sm11721297wro.111.2023.05.12.08.34.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 08:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683905670; x=1686497670; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kjK9aJrCfxZTneunS8eCzgZ7hBHA0FsCr6nfpvU0y2M=; b=sncGoFpl7c/z8JOlUU0c5Q2Dj9a1hb/tkZljfni4tdHHk7531SeFTltS0QC7e+9JQg q2LRfedQrwV67e4cdgK7XFmnzthB5Fz47DifvBERmLmK4WMwkbopdpxBdlyi8egSfwu4 xo715Ba+TmLIml+pMJhhK9cz6BKIkP+eShRcNyyrHhfcXIvgoI0/KUCNMykTQw60Q5DD ppx/DzZdXXZhIMvZka4Llyg29T8vTMsfqaWPLFmoXRyddq0CQvTqfbKpUQ2V/JFPm6E1 6x3SneTm3WApAQ77nzdMWtqmfjtkgrzIjqNS/SJxPpQ5S01XOCm7u8sK4spDbiOJphPQ 2Jzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683905670; x=1686497670; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kjK9aJrCfxZTneunS8eCzgZ7hBHA0FsCr6nfpvU0y2M=; b=lskuqQJjSqFmnKYLedyfB9gQBi7uPh6c2uCv8mwaAwhF8+OuXYYK9hCF4/fzpP+ms/ TgPSdHMaym1pPGUzLEPBAneyS39Ax28Lqqn+cyOZrHHVooq71WSptmoJ1/XaY6i9aLat spbl8aBUSu4+Tyq9jqMi4Tt9VXSYuKPic+MPwgL0hhsPql3d3B12WxJVr58jbsai/LpP QkyeagWokqQZ7hBFXODVYfpa88u6LhaJ5SlT8B8yEwiI19BX7ssO/0f2odvhyN3V+h5V KgwPNwdIv45PUGAYVVhQPuEXg0s4LmlBcIrW4QSJRz22bdncon5rqA29r13Vb4bSOayg RfNA== X-Gm-Message-State: AC+VfDzIXrj/EmaBC7OOHNUPz19ssyNb/0lOhs9e40/rK/OwI/lyI8O5 CG7Y8rWMsiePByBzFc68N+ay8c2FSua00CLneqg= X-Google-Smtp-Source: ACHHUZ58YkMxnb0Z9zwnvWtgTmJjk8pdDvGZCgrHGGwoPibHhT6BHwgJXIWLRur8WK4Nlj/h8CL14w== X-Received: by 2002:a7b:cd0f:0:b0:3f4:23df:c681 with SMTP id f15-20020a7bcd0f000000b003f423dfc681mr13061474wmj.12.1683905669726; Fri, 12 May 2023 08:34:29 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/12] hw/mips/malta: Fix minor dead code issue Date: Fri, 12 May 2023 16:34:19 +0100 Message-Id: <20230512153423.3704893-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230512153423.3704893-1-peter.maydell@linaro.org> References: <20230512153423.3704893-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683905812017100003 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 ru= n_addr, uint64_t kernel_entry) { uint32_t *p; - void *v; =20 /* Small bootloader */ p =3D (uint32_t *)base; @@ -785,9 +784,7 @@ static void write_bootloader(uint8_t *base, uint64_t ru= n_addr, * */ =20 - v =3D p; - bl_setup_gt64120_jump_kernel(&v, run_addr, kernel_entry); - p =3D v; + bl_setup_gt64120_jump_kernel((void **)&p, run_addr, kernel_entry); =20 /* YAMON subroutines */ p =3D (uint32_t *) (base + 0x800); --=20 2.34.1