From patchwork Wed Nov 27 12:16:54 2024 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: 845753 Delivered-To: patch@linaro.org Received: by 2002:a5d:6989:0:b0:382:43a8:7b94 with SMTP id g9csp751261wru; Wed, 27 Nov 2024 04:18:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWgTl0uFtoZn1tZd6NQZXSvn9RvYjn9FxBmhAO5Rt1FIh1IL0Q6yy0pB0H/CvXYvEoh7L42rw==@linaro.org X-Google-Smtp-Source: AGHT+IHu1nK0OxvgTK4eLuLliqFHgzSaz+0QWvzNATiS3PIE+xpRH4yx6ICx87CkqCd2bNZG3hr/ X-Received: by 2002:a05:620a:1724:b0:7b6:67b4:ddf with SMTP id af79cd13be357-7b67c49fa5emr419895685a.59.1732709925788; Wed, 27 Nov 2024 04:18:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732709925; cv=none; d=google.com; s=arc-20240605; b=dxBBqspv/tRhV6I/upgYRSxZ51FJIs86pdbH9V7dT7F7j2dVsUC+fOCrw0gJXkMhFh NnRSO9KqOh2C9uy4IGElAiO+zruF9DJGvguQzTnUiwXn+hbKBr+jMhZVEow9FAVvIK8l WpPCbwEwvjojtYpVoWE3mTvKS45/uqFNaxoy0NCZHJbzOlnpiRpIueagm9TdN0b602HI B65tSvlB8nL2Go8EYL1Qka7Pf5T+Wz24s4A0uPLCIQ0E4beBs25CiZGTedJNgstV2o5b h+O3rFx0myvbFRkN2QDwtrnez9+mBGxbEjHq53Vs7eA+PJikW4jYA7TqKUrenE8tcEUF 7Y8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=4NuUE7wlyBlmQOjXJ6jWzyk7rKqGNsAm23QWx4Jiwm0=; fh=hPEYkGzCDPyP/3ZkGHLTHhyYbPfmxEKmvnAkP1JYmAU=; b=GQ58C7Zw3U07KBV+NcOQLcIddobECuIDYL1cQel+o79Ufqb/p6X2e9z6xL/ODLSoSo nuFCN/QtLlAGzBiT4QAsrcvvqu9U/OINzw19YJNbfV889bFjuWHzEKgDX9QBWTdwJEKD cWak4DoR+BcnadSNsOEA3fXDMQd11+8qk4dieWxsT7VgDq7VeZVnzyXL3WO0aRzPvLn8 z0/6UyCg0U+l3hZ/kcakb36aq3V+Y7ku0VRhxyPpzVO46iwMDiKTtO4yJMk5jeiwktXq beob7EWFi4t4ZsjIhDdd80KymuCNZY10FYWM7rzyX9bz87t/sjtmlionJonNzFwDKQ83 RKDQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gkdULsff; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b66f8334b9si584351185a.665.2024.11.27.04.18.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Nov 2024 04:18:45 -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=gkdULsff; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGGzD-0004f5-HN; Wed, 27 Nov 2024 07:17:39 -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 1tGGyw-0004d1-3n for qemu-devel@nongnu.org; Wed, 27 Nov 2024 07:17:30 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tGGyo-0008Jy-3j for qemu-devel@nongnu.org; Wed, 27 Nov 2024 07:17:17 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-38246333e12so6578841f8f.1 for ; Wed, 27 Nov 2024 04:17:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732709831; x=1733314631; darn=nongnu.org; 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=4NuUE7wlyBlmQOjXJ6jWzyk7rKqGNsAm23QWx4Jiwm0=; b=gkdULsffrvEKw/H+wSH6jJR8fno7YggfAmhU7/uVnYK5ZARcDPH3Uyw+c1xK/74P8B jFcae1uCIy86IgQKLiWdyy5Xj44Lkt26wNC8FphixJxniI6sve0MD+p04VOjgNkXBJoD osf5iYdZORNwRd12JlqsLGzCJlJZpmgcUyjPZPXpDrrOtV5bq+BRpxxd37gokNp2eYCq a0NVVTlu1GMBKYQVnROFn6un7/FpZaxhq6giQCMWPjj2IX14n2UiTkP4LE53/cecZvtL 5xXtd9o9poGxRipr8mef5SfDO3cyRqCkGkKV/Iorxqspz0s/LT/TrgdUISTHC7rNgl54 t7fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732709831; x=1733314631; 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=4NuUE7wlyBlmQOjXJ6jWzyk7rKqGNsAm23QWx4Jiwm0=; b=a4JlCfkJAMNrOZXPg6giinAkP9aVjW5pWVpN8uN7lngto7+jTN9DIT6PgEF+PHZz2n P+E2CgUl38/KuI5dsMP2Uub17xKCf78pf6plQxum+RcNSvxyWIH/EdTp260RIu/+3Gzn SJM/SA4+8L/tMOtTIStVNyYfP4tf2hJNw3cIZ8oOf2vcitdK/ZUj54rdBWUBL0hYYBj8 lKvgF+HiN4EPoNbJxUwnPDnh/G2w1fm9g5QVkACojG+Ub+X9ZI2hZTvfuE0sa192S7yb 0rUUp33x4SSCEQ3gixNfggukS7a9dytYPffgjue/HWyL0V+pft2OxmK88azusgtTyWid TKyw== X-Gm-Message-State: AOJu0Yw9MkQwfy4LPXfJyYMpdoWr1mmxyUGIQaScPfg3XCBHpljY9TcC +K7QydRBl+vGbDuJ2P8xD/OZSDiCnUZtk7UrHMI0LEWoc3i2D+EvPfu96C6qOQtqo2Y1iFRCvzC 7 X-Gm-Gg: ASbGnctoP4DpIq/ImlCaF0HVN+BzDWArWJWhzqeGIlOcZUVw7YHutnGm5ltDocXKO4E jIQGOJ3NW6l/qGDanFkJ/rssYRntkKyh7e3Wpuv/LlDB35AV0TtzTJ4/EkfJGcJ4ExmIqicvK1a dizx9SErWh5sLoDln3lFNk1MqWy31jDYMVtMcmKloxnoKIsXUmZgR332OfNwv7BL1OlEl7DP6PW MMmjeTZbLVeQxq+F+6PcrTTc3qVxia6dQh+Waavr5pBrgkH5Z43Ayh9J6IauQNe5HhNQxYXfMA6 kqxdhpOoLCrOw/KJJ+MXTVX6uug4U/NBZTGv1C1DILE= X-Received: by 2002:a05:6000:21c2:b0:384:3731:d721 with SMTP id ffacd0b85a97d-385c6eb7c74mr1798190f8f.19.1732709831595; Wed, 27 Nov 2024 04:17:11 -0800 (PST) Received: from localhost.localdomain (plb95-h02-176-184-14-96.dsl.sta.abo.bbox.fr. [176.184.14.96]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fad60f0sm16157301f8f.22.2024.11.27.04.17.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Nov 2024 04:17:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anton Johansson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-10.0 2/6] accel/tcg: Declare local tcg_ops variable in tcg_exec_realizefn() Date: Wed, 27 Nov 2024 13:16:54 +0100 Message-ID: <20241127121658.88966-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241127121658.88966-1-philmd@linaro.org> References: <20241127121658.88966-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 Ease reading code by declaring a local 'tcg_ops' variable. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson --- accel/tcg/cpu-exec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 8163295f34b..18d9cf0ea58 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1070,15 +1070,15 @@ int cpu_exec(CPUState *cpu) bool tcg_exec_realizefn(CPUState *cpu, Error **errp) { - static bool tcg_target_initialized; + const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops; if (!tcg_target_initialized) { /* Check mandatory TCGCPUOps handlers */ #ifndef CONFIG_USER_ONLY - assert(cpu->cc->tcg_ops->cpu_exec_halt); - assert(cpu->cc->tcg_ops->cpu_exec_interrupt); + assert(tcg_ops->cpu_exec_halt); + assert(tcg_ops->cpu_exec_interrupt); #endif /* !CONFIG_USER_ONLY */ - cpu->cc->tcg_ops->initialize(); + tcg_ops->initialize(); tcg_target_initialized = true; }