From patchwork Tue Apr 16 13:52:41 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: 789216 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296896wrb; Tue, 16 Apr 2024 06:55:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUJlqKRTQm4z0G4m5EIkinKbBYVFgvvqnQd6TyJSW/Bz3Ub6TGiLq6byFbyrxYvENoIAz/63auoSRhjKVWRYerg X-Google-Smtp-Source: AGHT+IF4vSmdOpbqqgipqrFgylQ3szHrPZWB50GNkWYMrqlKGOsS4E6VCGsQed+tMjPQBh2hU0MV X-Received: by 2002:a05:622a:5d4:b0:436:b23c:2839 with SMTP id d20-20020a05622a05d400b00436b23c2839mr12650568qtb.22.1713275715186; Tue, 16 Apr 2024 06:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275715; cv=none; d=google.com; s=arc-20160816; b=zDYMIX7i0XFIBfiXBbuuDgoDfH0/653PWQS3PPLJzag2J4tUFbZjAZNWlEkcfqmsUU z9rrgK3JNsGofNEjDNg8gXH6bUZS2o6Yk+pC7yTYrVjw4UzWGBJI1Vxi7A7ajg/0XC+v Ruo3CqXi50nhZdsaH5bqolsUpS0o0P79mIdZ60BpsUSmAOF/P4NWgwHog5t+i9FxPGIw k98A0pc/7rlceCD1zakpknKzVeQR12HldkouwlCcaX6VNoRia+qA62ft56bLgFi9pZfO +sNufDnhfIAB3RKvW4/l5bnbH0fQAizyXLFe2ZCjYx306XR6H/cuISWEyneo2jXO1lg5 KygQ== 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=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; fh=dUUvmIu65tdQ0um/meyBDxDLUKR1CnrLpZ3jlbEBd0g=; b=BOu99bWd3rMh0U37DcgnZpDwkaiReKKii9iyGovL/Cw2C2CZKSVEohWwrggnhZbJW8 R7CfsdgFUeNNwIOk4uT6otBKATqvqGIjTL7n6uucYnzfh7W2B4FMgbuXf0XemtzwEc+G 5nO42naOc3WDgH0ph/zwv9t2SMgq2pVoS/6FD+e2zkvrujRvFr6397Af2NDZMtgCmvRg 6JmgcUY0e3o2DqXiAqsuiW/cT/xSj0iWwtuBL+/TqeNoY2oep9CufbV5z6GRvM2gNVf5 4G79rY91JYFC2Y3J3x93uIF6FAer2vcfu4m6o8BDr0qFF7JmgmS0NHKUwMfCgPpl5xi2 EJDQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NkqQ9jYU; 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 m17-20020a05622a055100b004365cc0752csi12023698qtx.227.2024.04.16.06.55.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:55:15 -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=NkqQ9jYU; 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 1rwjGQ-0003N8-Qi; Tue, 16 Apr 2024 09:54:22 -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 1rwjGJ-000308-MK for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:16 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGI-0001sA-3j for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:15 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-56e2c1650d8so4418199a12.0 for ; Tue, 16 Apr 2024 06:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275652; x=1713880452; 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=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; b=NkqQ9jYU5x+proCeNpNSj+Iw2v6xVxmdRZE2io4XmOHGo9Pd9R8Rpiln98sql+8FwQ ZypMYyquyscF/aTKvpxc0MF1DoNJBji6wnEE+lM2yvg6VdAtNSveM+iKviDAu7724YGi 5QCAKimMWQyeWVIljaHTzxmh51xLkDJmC+wOmHLwfIpM3PtvBkJiXbvtcf/k0J4EPfkm pzv5b17vTsAzd8UBgHIuALUPC5d3TiORz+LN6AC0DDrcHr9kGnZ6zor7Gpf84Wp5tZ4K 4BFrsXeErVUnetyDtivoIrh6FukngierXR7hkET+wM0Tkwzho6BdCkMw/6vUZkcA7mWo rWVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275652; x=1713880452; 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=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; b=bZhvTZWXv0f3FRuR2B+Mu/cozEjdY0imiP0xB4rVvsarL39v8qUhiNKSHXHOHfaNdy +l71tNDpE3jRTlDuXfWkcMNCXqOjZRfEOZVObM9FLV5nvF3YEzkInRJY5z81bfNRDIJx d4CxVuhktV5wxaKj6/Eb4Rf6t4YHr4Vx0H1fSwGKwwwV7E43YXv7Mq9f4go79g8vMdOE PsV+Bca7vd14i+7PvR/Nr3YF552sKPT35eN+fZi/R75WBrSZ/aKKH6bhoh+iCnVI3b+n 6rTQ5uTmxq9NjcvY8+nh4eqzCBrDcYbVcoP6H01INXaL038Hpm+U80+bnoKjilvqJxIt GiHA== X-Gm-Message-State: AOJu0YzXj4dod8OQ10jiPnengeTjCB13hhn7r8Uf7eeN9ZF7QiEctbIm myFoeOdrZiRmg8IYjbNYA9GiO7uxcIpaWXldHwN/z5JbdBaixRYbtNJVINCAresyC3MSWRA0FPb w X-Received: by 2002:a50:9ec8:0:b0:568:32cc:f808 with SMTP id a66-20020a509ec8000000b0056832ccf808mr8400333edf.15.1713275652383; Tue, 16 Apr 2024 06:54:12 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id fi11-20020a056402550b00b00570498c622asm375182edb.66.2024.04.16.06.54.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 12/22] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Date: Tue, 16 Apr 2024 15:52:41 +0200 Message-ID: <20240416135252.8384-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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 'smbios_encode_uuid' is always true, remove it, simplifying smbios_encode_uuid(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/smbios/smbios.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 8261eb716f..3b7703489d 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,6 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void) static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in) { memcpy(uuid, in, 16); - if (smbios_uuid_encoded) { - uuid->time_low = bswap32(uuid->time_low); - uuid->time_mid = bswap16(uuid->time_mid); - uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); - } + uuid->time_low = bswap32(uuid->time_low); + uuid->time_mid = bswap16(uuid->time_mid); + uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); } static void smbios_build_type_1_table(void)