From patchwork Mon Jan 9 12:01:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640632 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2105378pvb; Mon, 9 Jan 2023 04:30:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXvMcAM+PRdvJy+KCZkC5VWifUj33P8io12OPVpX/a4yMNzO553zUSTzhiFj8i+iJwVZqY+3 X-Received: by 2002:a05:6102:38d4:b0:3cd:95ce:3703 with SMTP id k20-20020a05610238d400b003cd95ce3703mr21391074vst.25.1673267459157; Mon, 09 Jan 2023 04:30:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673267459; cv=none; d=google.com; s=arc-20160816; b=gsMfYYSbkUY5sjDbf368NTWPCUNmIEke03HDLxc4ghzUo4oyME1is+nPLM/Q/Wltbm lJy0WS2jWqo9D1NDZ8HjSbfOQiaMzJmdqrhz+XCv9txuLZ/e7IZPyMsmqMzB9j7yQJ6T OiqpbQbEEpdRkOQv094kBa2wf29w1Ta0YiFSwCw5sAQcf//en3gH8NA646O5fyDkTl1s EzPD+uEf3U1+U0HclBScuY8tl96oYIIxiDRjr8eydAL7zAxMa21CFJcmeb14gQB9bZv9 u1jLSV5T8J2wKZTUzvx1l9JK+2+vamW+wjDxHrDTuyRRFDd+Fgmi2lwNUDcJ/ltOfaA2 uIWQ== 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:cc:to :from:dkim-signature; bh=c6I1HLCSYyw0uAOoILOG7NYLqOybQWcLBPyeCZd7TC0=; b=xxfB4MK4B0/11PRXvixNAEvQ9oYRH5G5W1A8TDWajZmOHgC6yybOfNStao5Hd90ydN nv8K0i69e0PUU8RJm2jz9q+bFRBEtlw9gnDtsYjaVNmJu+PYbu9pI0UVqyHGXj7wr74/ LrAptjmqvEnHwqFxqj4eXD335yp7b9FR1Yc/53lEeCx5rdwRaWPeuaP/qaBC1oTI6pfo VzBIbWPNM4iFibCIemfW8EoNRdNKJaB36hVPrdq5ZmCK/Gjbyuw3HVXIbhrk5NkdtZBM yffqC69rkKB6BbMzDt+nUC5VxRbLvvGBqRkLt7UVEfbPkKbRSf/2SmQxgich7b08vKtN coFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xg9IfuLI; 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 o3-20020a05620a2a0300b006f728fb70f3si4864650qkp.500.2023.01.09.04.30.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 04:30:59 -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=xg9IfuLI; 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 1pEqqw-0005sJ-N0; Mon, 09 Jan 2023 07:02:10 -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 1pEqqt-0005oa-6o for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:07 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEqqp-0001uW-PN for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:06 -0500 Received: by mail-wm1-x32b.google.com with SMTP id p3-20020a05600c1d8300b003d9ee5f125bso2312206wms.4 for ; Mon, 09 Jan 2023 04:02:03 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c6I1HLCSYyw0uAOoILOG7NYLqOybQWcLBPyeCZd7TC0=; b=xg9IfuLI7eQOsq6ONF5YgbO9EswzewJzZ7mXUWKY/+tkBLy+bo33lQNdSBahGMH/I7 q6Cfnd2GL8D6M7dnejza88qrS61xE+g8FLsF/1tQCiOJCEsUxkpJ9j030wm7LZnT9Q3h jOkddAkCxp13S7/X2b4RNi1htgt7pCdicYSG1Qej3TqdJ9uqEzNdvakjetrlrLNVjsw2 O4oXPYAJp+8a7Ib8C8ahMnrexrfrHSfp09qjtxwnt89dnZxfNTXZm5O+7iQtYxSVpWcC 6DyN3wOqYJN3iEwe8zY7NJW7LI9ALFQR8QZM2bUTMNGwrez8zfzX6wOqgTy9wtzB3KZM ZGkA== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c6I1HLCSYyw0uAOoILOG7NYLqOybQWcLBPyeCZd7TC0=; b=nKNePpQ80tmS5pqMZJU90xoMB7qGo/AlLTfLk6XUGbMC/ES+D0Qse5ruiRJIHrclhn Ieqdpwld2n6ndK2tf3cX1ZCO0id1SvJCsU+wBy0X4pWwKZntNaPb54cVFSLn7QdiY2Ch 38aVZ5FIEx2gniZZIp7ToTbrWfukp35n7dB3m/00dj0vJKWvjkUnlC2j+zGRD2O/Fh70 9QwpIB4xHGLldUTk/FV1jaxzwuCQ9MoYalLBkD3nLkc6hfISMHa26DWXLzPE0Vfoh5Ll cxs9d44KkL5Uw5HiwpwBQ2NdhVauc+F/lRQQq10n/kqTuBITatUOtVnieOYRyqmmtFQy j1RA== X-Gm-Message-State: AFqh2krtTPtX0xxddvCw7BMsVKAVprKikXLxPbqqAXjtAABTvY6CRRit zm8norqtg+MuQSJj64RLUARhmgbeeJerauwv X-Received: by 2002:a05:600c:4d14:b0:3d3:5c7d:a5f3 with SMTP id u20-20020a05600c4d1400b003d35c7da5f3mr49498434wmp.37.1673265721968; Mon, 09 Jan 2023 04:02:01 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id bi22-20020a05600c3d9600b003d208eb17ecsm11123199wmb.26.2023.01.09.04.02.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 04:02:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Yoshinori Sato , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Jiaxun Yang , Magnus Damm , qemu-ppc@nongnu.org, BALATON Zoltan Subject: [PATCH 1/5] hw/ppc/sam460ex: Remove unreachable code calling pflash_cfi01_register() Date: Mon, 9 Jan 2023 13:01:50 +0100 Message-Id: <20230109120154.2868-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109120154.2868-1-philmd@linaro.org> References: <20230109120154.2868-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=unavailable 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 Since its QOM'ification in commit 368a354f02 ("pflash_cfi0x: QOMified") the pflash_cfi01_register() function does 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: BALATON Zoltan --- hw/ppc/sam460ex.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 4a22ce3761..cf7213f7c9 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -103,14 +103,10 @@ static int sam460ex_load_uboot(void) DriveInfo *dinfo; dinfo = drive_get(IF_PFLASH, 0, 0); - if (!pflash_cfi01_register(FLASH_BASE | ((hwaddr)FLASH_BASE_H << 32), - "sam460ex.flash", FLASH_SIZE, - dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - 64 * KiB, 1, 0x89, 0x18, 0x0000, 0x0, 1)) { - error_report("Error registering flash memory"); - /* XXX: return an error instead? */ - exit(1); - } + pflash_cfi01_register(FLASH_BASE | ((hwaddr)FLASH_BASE_H << 32), + "sam460ex.flash", FLASH_SIZE, + dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, + 64 * KiB, 1, 0x89, 0x18, 0x0000, 0x0, 1)); if (!dinfo) { /*error_report("No flash image given with the 'pflash' parameter,"