From patchwork Wed May 29 05:15:28 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: 799816 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp567048wrz; Tue, 28 May 2024 22:17:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX42ZKAQoTRlvXgpK9cTDDiMpBIJ4/u0Al1CiX76F9OvoriHi2ub+d5QBeJfQhujiGyMZLzjN7HVs+PCVqr5mRn X-Google-Smtp-Source: AGHT+IEPsTcEre9BfGhYfWxGCu5cQvn9vVqC2E2DIZrY00KuUI5MOymmmhyZDHb6WuC7leYng4sE X-Received: by 2002:a05:6214:33c8:b0:6ad:657a:5887 with SMTP id 6a1803df08f44-6ad657a596fmr161859096d6.41.1716959865278; Tue, 28 May 2024 22:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716959865; cv=none; d=google.com; s=arc-20160816; b=NAiasaj4wplFVZ0n25d8Ukk+DVqN8nlKf1mMUFf7PR8cqAd1koiAdfhcTdmNunoJF8 CndC6qkQqCZPfehq6KP6zIlBrSoazjM0HZsE++/n4IPn2K3Q95+iHALSpxfBR64LaCwF YsY+OHDHWvOv380oXKeFWtx95yr1aw2CMJvTCjVfHUMcH5dzQ4Jl289pbr9DJ+oqPJQJ PWJYXji2Wt9FN3ikfrSvls6px+Byl28PPZISNDUqavIXEyR6GkBzqm8ZW7P3cfvh/oDJ DAqvwIYDZdwL4CrovIyuerg4hQNK4Tuvy3CbV+Nr4qCTYD8MqWYMjmaVVU+qUNcueC9a Id/w== 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=oSujGHGU6kAtfrTPSJ+sLUg/jC0/xSWRKBD061WPWBw=; b=o0s2kh7FRBqHq76XpyP4t5kdmMyLzQ/lKzqf6J+ZbzQlf6ioKtY2df6E3c8ToTgv7f AD9NyK+tcRlajnzSui4POAwSIvnA00MzJGc2IZmc56DqBZo7KlXeBBzNcLcathwbGwvH DAQoN1e+UOm95vXlxrIUqolma6isCw5icYgYX6tYkYdhPI+jhK+2hy1UqEtu1epbAKT8 8a5vIGhFCeSKVlpH4052K+2C59sJBoH7ubPX9YAAVarUza09li0h/JOLRuKddwC+TlLl t+ObgAbNdReE0k9GoogmTSjO9J/lj/Srl1TK8WHTC+/IWyIKOzXyYiGGxX/EflQ9ZI3/ DcZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hekKaadg; 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 6a1803df08f44-6ac06f4e973si119896936d6.61.2024.05.28.22.17.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 May 2024 22:17:45 -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=hekKaadg; 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 1sCBgH-0000dw-U6; Wed, 29 May 2024 01:16:57 -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 1sCBgB-0000c9-DN for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:53 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBg9-0005Ss-Q7 for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:51 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2e964acff1aso16416381fa.0 for ; Tue, 28 May 2024 22:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959806; x=1717564606; 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=hekKaadge6WgKwFkOMFpgNYomJX57IUHABKjpUTMXebqy2y2e7SvKjvA6LAjTSRecM E+oTSu/Wvlz8tLh5ZLfukyIZme9B+TshV9W6KfOm90TTpBwA9BQx8EIqBqn7IsLM3srJ Uf6bJnymvS2SO42zOMKDe6vDlBbTGYgZsz+vieXHMDdm7J8YIqGS5FMrAyTQlmdjWl8j Xj6spMeKDrtnnEdyZrw/P+Ulho6uiihib4wqNvEWaBlMbM1cCTgKApBrMmqQMuNPhqhA HAEi0U+rbLDN5/bn/19/j6n8cC4vuivDdF0iJoXIan7dNQKbHRafEEGyeXMQjjNnzF1h xMGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959806; x=1717564606; 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=vJ1p/ra+uLEhx8710lOqxXZtdvQu+Hq5ka5z4gYNIpxAv4SO5e1qQlju0xz3TKNLa1 oSNGBUjAWCp8qw+rRrebjs94j2xWOw34wgiBTnGimy1uIS+WiPnzcTxSDGGEROOx4UIe W7WGExdREslumY84JpkIrYWGWwRfroV9fRxOyXZltZq4ntyKTlojVkQ99NTEm+HyeCGm opfIP6k1lMv87wSQXhvq7CLqpf/OBRO9NMg/PPj0WBVlmTktQRVp0LJF2P/fEy87Y6Rn vuDgeBU0YxHfFk2S3jiWpggpKMeUdnZjflBVCPYYB1WlKTEiB/VQa9HnDhTGzcQeLlIJ n0AQ== X-Gm-Message-State: AOJu0YzUQLhaV3ocwIXJY93D4nEJypdV/xTgkE4peTGu4QE+AZYCw8wK YrlvzQ0DxJ1QxP/u1P1HYps2DYZo2nOHe12fOrgVI0of1sUkvk08iP9oCNKWsjEvFH4wsNGFTsq Q X-Received: by 2002:a2e:a178:0:b0:2e2:1a8b:e2f with SMTP id 38308e7fff4ca-2e95b0bcf29mr88847571fa.2.1716959806519; Tue, 28 May 2024 22:16:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100fadcabsm197280155e9.35.2024.05.28.22.16.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 12/23] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Date: Wed, 29 May 2024 07:15:28 +0200 Message-ID: <20240529051539.71210-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=philmd@linaro.org; helo=mail-lj1-x230.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, T_SCC_BODY_TEXT_LINE=-0.01 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 'smbios_encode_uuid' is always true, remove it, simplifying smbios_encode_uuid(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- 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)