Message ID | 20240927214531.20242-4-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:66c8:0:b0:367:895a:4699 with SMTP id k8csp968880wrw; Fri, 27 Sep 2024 14:46:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX3lEPFilAoSUZpnzcGqJ4RLqJhymJJ2pyydAm04eauX5XE31YxNDN1y8acGCqw6YG+tLZrKA==@linaro.org X-Google-Smtp-Source: AGHT+IGZFwB2k0OtLR2Xt9Lt47z6f112Vf8i/WkzY7rj1GsAACMzuIPgGhP1V2vZq4SeHDfZr1Xp X-Received: by 2002:a05:620a:1987:b0:7ad:c2ab:c693 with SMTP id af79cd13be357-7ae378d6077mr631918885a.64.1727473603825; Fri, 27 Sep 2024 14:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727473603; cv=none; d=google.com; s=arc-20240605; b=cEnr+P9nv8UwfRoRMBDaUM7NP3hpbM2wvp2QKTHDNz4RSMDgA1xfVsziqweiAkbxK+ jLnGXlJvb8wqLPIJhoVVBKLHjgQoeJOp5wXfWCAHrX9+V25fL0/Yf93RfBXNvD6gVpwV DEDMTwdqmGvFVHZ7etQZ5JBX4osGG4Hr79QSqL/nMmDKMl+eys5zDwfathD+4u9K8zSt sNHo6ocNZegHiVyr+5DfVGgk3v6jBEbj8yiKvxrSYG5e6aSm1XhzCT7HuFkAoLMD/xhq bXwGnLGmH6TqWDkY0rQM8Cs8dSE/SqTwvpjMiQ+RYyur33N4b4M6Z+T0Ds1UJbreZ7p6 uh7Q== 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=Fbocd4kmjbgTZkW00sKJRg9Q/JlRfFmMDabLRJXpjXw=; fh=g3QeHlbvb1KMMNFLUbXIUYUDrJCyu1ADbrLKZLJdjPs=; b=DD86l4eKgiuyErSyz+rzDSsfqXkOmYpXV57q1xoCih/+clhlpOu2JeeOo/F+Tbju9/ JZoOIXKZfp6/ikazRfawNcabqbi4+N2hrEatKcypIbcBiIDChmDW+Hnt5bVcsMX9Fg6M /8XEH/C2UEK/lucX/g2GY7phWvTPzr1uNUITMvLn3RPhk6UATo/eCF1J3Vde6sQIqr9f m2rhfSeCeaUcAFT85PZqP7k/1+hwBTa4HdOB1TJEZ/boLBerqvgg0eTkvhAiqDYYEQlA 7f/PzgMhveLxd7K7xBo1WiUVQt/Ko7BnV2zxfomINCnSgo+Kr7HBVeqf5900T/J/2Nde p5zw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K4SJx18e; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7ae378557e2si313685485a.484.2024.09.27.14.46.43 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Sep 2024 14:46:43 -0700 (PDT) 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=K4SJx18e; 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 <qemu-devel-bounces@nongnu.org>) id 1suIml-0004Ss-4J; Fri, 27 Sep 2024 17:45:59 -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 <philmd@linaro.org>) id 1suImk-0004Pa-7i for qemu-devel@nongnu.org; Fri, 27 Sep 2024 17:45:58 -0400 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 <philmd@linaro.org>) id 1suImi-0003w1-Oa for qemu-devel@nongnu.org; Fri, 27 Sep 2024 17:45:58 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42cbb08a1a5so23862415e9.3 for <qemu-devel@nongnu.org>; Fri, 27 Sep 2024 14:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727473555; x=1728078355; 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=Fbocd4kmjbgTZkW00sKJRg9Q/JlRfFmMDabLRJXpjXw=; b=K4SJx18e3KP8qa1ATO9TlXGNmoSyGlFxcD0ybXAGMZvYR2Gyu3aHwbpKbhyMWk3IhW 4B67Rvbkb6W1K+xEF7eeSDIemCPvbqe2la+YW3DeZwIahQTkTGQ8SFl7Ajnsi3aE6LQY NkEFgQlAlOTvyUB0qaKb+riX4olt2uMfmWMCTbXyU+l2VD1A+FKjqJkAALOjmoE0mriA wHKUDtN+dbgyy2b6NqUFzWY9eeOBf99E1ej368gnNeJp1x3Z3+arROwwVcebgsfHuUVO eF5fbpxx53K1B0sNc6aQvbfun5gg6Mdgku0VpFUW6QinR4dp4LyfbhZbfUYI8YH8NMaR gryw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727473555; x=1728078355; 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=Fbocd4kmjbgTZkW00sKJRg9Q/JlRfFmMDabLRJXpjXw=; b=ZMa8kCXHlrvEWd04n9UJZnQ4HmXmv3Gj0WS3tToemRYcgg4aP/GQ7vgbX/3pZ5+68x szKhi09RCnCUFGjzfqlRSJ0YvUEO6et25pLiuYWPKbMa9SvlXcSigh+8M5wdVE4JQAhu TmGW/ZGZFiLg5sWmKG6QvBOtecejdm37K8fgfaNGt1BwdvXggdO+ETBBttdnS+mcOgWz FH4SqG2axah7qmowbZiwDe+ivieDyD5jugI6UpcwOCSj5EQbkJUwWTjLYZwRJw/KbhSG Kgyik35hOI/Jac/iwyrFAq/zRmIh06BuXBbGksa0WVQAYVnBOiDurDh6KQW0grKpP5WA QRFg== X-Gm-Message-State: AOJu0YxgJUdzY3udCtJD8uSTJMBz5pcoLYf31UPUfSWYGT9IlvgQHRRk 24q77CsIYKibFZJ4pDjFKQJXRrnC42Pv3ECTMRO/P43ngmjLxC88/rt0mCfBo6BPPzEFUlstOWJ L X-Received: by 2002:a05:600c:45ce:b0:42c:df54:1908 with SMTP id 5b1f17b1804b1-42f5844ba2bmr35683315e9.18.1727473554875; Fri, 27 Sep 2024 14:45:54 -0700 (PDT) Received: from localhost.localdomain ([176.187.217.136]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a52308sm84020965e9.43.2024.09.27.14.45.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 27 Sep 2024 14:45:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza <danielhb413@gmail.com>, Nicholas Piggin <npiggin@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, qemu-ppc@nongnu.org, Alexey Kardashevskiy <aik@ozlabs.ru>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Jason Wang <jasowang@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH 3/4] hw/ppc/vof: Simplify LD/ST API uses Date: Fri, 27 Sep 2024 23:45:30 +0200 Message-ID: <20240927214531.20242-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240927214531.20242-1-philmd@linaro.org> References: <20240927214531.20242-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series | hw/ppc & net: Simplify LD/ST API uses | expand |
diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c index b5b6514d79..fb152efbe0 100644 --- a/hw/ppc/vof.c +++ b/hw/ppc/vof.c @@ -645,11 +645,7 @@ static void vof_dt_memory_available(void *fdt, GArray *claimed, uint64_t base) mem0_reg = fdt_getprop(fdt, offset, "reg", &proplen); g_assert(mem0_reg && proplen == sizeof(uint32_t) * (ac + sc)); - if (sc == 2) { - mem0_end = ldq_be_p(mem0_reg + sizeof(uint32_t) * ac); - } else { - mem0_end = be32_to_cpu(*(uint32_t *)(mem0_reg + sizeof(uint32_t) * ac)); - } + mem0_end = ldn_be_p(mem0_reg + sizeof(uint32_t) * ac, 4 * sc); g_array_sort(claimed, of_claimed_compare_func); vof_claimed_dump(claimed);
Directly call ldn_be_p once instead of be32_to_cpu / ldq_be_p. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/ppc/vof.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)