From patchwork Fri Jan 13 14:11:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 641961 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp239059pvb; Fri, 13 Jan 2023 06:39:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXvEeZZ9PwFB2mXTMfN9i7XJYeDNYxGuFp8WUQZUKnS9YvFRT/uBJKozMT59xxJRf7IZDkSK X-Received: by 2002:ac8:4f51:0:b0:3b2:2052:3c2b with SMTP id i17-20020ac84f51000000b003b220523c2bmr6819625qtw.20.1673620748597; Fri, 13 Jan 2023 06:39:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673620748; cv=none; d=google.com; s=arc-20160816; b=MLrJXXzcITbJsrj36yJYC/5V7qD7PkB10LHc9BeRKWpGlP03ofzAbxuQnhdN0f8Zs9 7QXgV6EXks2AIbRVA0vY1DdVUus+ddkpQuA87cGSqleSjhGkGmlAeLiCsQI/KR5jHJfl x063xCXfl3CxAUYfDBl8LbLTodJ9ptSCQS1k8xRhNkpdvVKU/bWggqr7PX7Jkxgt0wxu hGo4a8KQpDE1Cy/asluCOfMvx7+FwWjrRqH+623UDBPBWcm+73xpz8QaaPq7fvqXdWBo gnBWZTTWcNHhAfYg/UIvNKwpLJPCAz6GZ7GyTWY/GSbOht/u/hziG6jiy5vOchjU8B6T ttCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=EM2/m4aIPwCcmm0UYVNBr9Hej5isozR7WVzOBPfC9wI=; b=yo/1QwiKwXfFGGfVCUgQav8p8Peu1L6BwXaMQYkUorF8DLHxIhNK7DJ42Pvnj2RKvp r6EPsYsggfgcsqvkMkCk/aoxrleyhkK0OSeByFL8HdB1ezOaJsnIgT12RPyMqJmSz8Ag +yU/F+G5QjvJhp+H8vt8grX7DcTGUfcUFL0TOB3zFgb/XExC5fKYbKh0z3kNAmqgFmmC BQWBk/bTULiNyreO13amWn0dY0eoZ7CORJuJBQd5vvZSOB4ORxbr4o8nP99n8D/wEwYs VmklzttIIyHqYHWTKNonGI+jRXQCPC9CAfdgbm6ceU9l2+2pi6qfU4IhF7le1lnB4uTB akxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LBg6gZn5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v9-20020ac873c9000000b003b2775f3643si2073899qtp.309.2023.01.13.06.39.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jan 2023 06:39:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LBg6gZn5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGKnM-0001ag-6j; Fri, 13 Jan 2023 09:12:36 -0500 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 1pGKmo-00015F-PA for qemu-devel@nongnu.org; Fri, 13 Jan 2023 09:12:03 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGKmi-0003eW-PO for qemu-devel@nongnu.org; Fri, 13 Jan 2023 09:12:02 -0500 Received: by mail-wm1-x32f.google.com with SMTP id j16-20020a05600c1c1000b003d9ef8c274bso13090319wms.0 for ; Fri, 13 Jan 2023 06:11:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=EM2/m4aIPwCcmm0UYVNBr9Hej5isozR7WVzOBPfC9wI=; b=LBg6gZn55+EvOJL1EoQ3EsACxPVjYiJHBCTPiSYNnpQHlxes+yoDle+bAuFbCEHPmo xKhDsvO5xyvBUVf95eigAOsy60eszPyh3fRab8GCkNlzXHjuS7+lqVBd9xdQ4GEZVRkY OJheL76CWXsYmfEa+95u8X3ApvYTitZJ5tqvOvYFLFDPyf5QIdxm7/P0kfEBcVut9pNm 4hve5HEHiIDfvYFfyXmbvNd71K0SogmBKTNlwUsRcYfJikt/C4XsLsexBwh+KpLsBelN KCyuuStoe3taoTpVXah7cPlnhdyLYvWJvnmvjnuPFLp3Y+HGgEDp5eVY3DAJjvu7gNvC NuFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=EM2/m4aIPwCcmm0UYVNBr9Hej5isozR7WVzOBPfC9wI=; b=B2byQ25JocSEi0zgs4Jn67MPMVPPYzc4c5Eyy+a1jtyfTiMze8HdwfEnLMPgznTCm9 vNXhHo/iTJgPprDdj+tFbvMfBtD1joWwPvBpK9+I0rI3TO8PwUhTbUYMwh49kaucJLPK Go03y6fUZsB3XlT9x54TMl/vkQkiORm2C5TAU1zYbPMDoGbXZTw4XqWCQ514SAQd0ICa dEsKZufyAeE00pqC0cpFIketKZpmKzR5wG+6Ky3Fv/OXH951jV/VhIXxRx97sakDH2t9 RQeBH9xpysRpZUda7notNC1t6WcafFNh5MNwPIzlHx2rkOY9m1tWwD/dEpTE/WzKlZPC 4xnw== X-Gm-Message-State: AFqh2koPgdrdh6WVUvMKOFPTv1LyOs2HINEONAwLmZqqk+FItwTysc3u Skj7Jgj/t8RLHm5icknjuVZpoBCVCS+/COuM X-Received: by 2002:a1c:4b04:0:b0:3c6:f0b8:74e6 with SMTP id y4-20020a1c4b04000000b003c6f0b874e6mr59734125wma.4.1673619106968; Fri, 13 Jan 2023 06:11:46 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n36-20020a05600c502400b003da0b75de94sm5334464wmr.8.2023.01.13.06.11.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 06:11:46 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/38] hw/arm/vexpress: Remove dead code in vexpress_common_init() Date: Fri, 13 Jan 2023 14:11:10 +0000 Message-Id: <20230113141126.535646-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230113141126.535646-1-peter.maydell@linaro.org> References: <20230113141126.535646-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32f.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Upon introduction in commit b8433303fb ("Set proper device-width for vexpress flash"), ve_pflash_cfi01_register() was calling qdev_init_nofail() which can not fail. This call was later converted with a script to use &error_fatal, still unable to fail. Remove the unreachable code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20230109115316.2235-13-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/arm/vexpress.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index e1d1983ae65..757236767b0 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -659,10 +659,6 @@ static void vexpress_common_init(MachineState *machine) dinfo = drive_get(IF_PFLASH, 0, 0); pflash0 = ve_pflash_cfi01_register(map[VE_NORFLASH0], "vexpress.flash0", dinfo); - if (!pflash0) { - error_report("vexpress: error registering flash 0"); - exit(1); - } if (map[VE_NORFLASHALIAS] != -1) { /* Map flash 0 as an alias into low memory */ @@ -673,11 +669,7 @@ static void vexpress_common_init(MachineState *machine) } dinfo = drive_get(IF_PFLASH, 0, 1); - if (!ve_pflash_cfi01_register(map[VE_NORFLASH1], "vexpress.flash1", - dinfo)) { - error_report("vexpress: error registering flash 1"); - exit(1); - } + ve_pflash_cfi01_register(map[VE_NORFLASH1], "vexpress.flash1", dinfo); sram_size = 0x2000000; memory_region_init_ram(sram, NULL, "vexpress.sram", sram_size,