From patchwork Mon Jun 17 07:11:07 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: 804849 Delivered-To: patch@linaro.org Received: by 2002:adf:fb90:0:b0:360:93e7:1765 with SMTP id a16csp434326wrr; Mon, 17 Jun 2024 00:13:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVcWVDgujQF88qTb0EByinX6bxC9UmN4uXhGyGCy/dgp3+1071FyDlfUfBQNnlqs9egdD8rlEF5b9CSaNNLbsCJ X-Google-Smtp-Source: AGHT+IGmd/tgkSfs6NgMtzMYFRTf87xQdkS6Fub2i694B/FI9Hx1pvnCGmTOFtruPqqQXpS/ZaXh X-Received: by 2002:a05:620a:248f:b0:795:4f73:c0d5 with SMTP id af79cd13be357-798d26a86admr1059046085a.63.1718608391970; Mon, 17 Jun 2024 00:13:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718608391; cv=none; d=google.com; s=arc-20160816; b=Pe4NTmb+9ozX8r+Qjuf39SSTNByxKeaPjYNuqETcf70K4M1oUllzgknxhCQ9M2aOSj 4MS1z3xQeIfJvG22JnL/0bM5zMDTlCmLzsJcPF9qTIe0DZxB3UUVWvV8/wBMjUna8x9B zHbr038gaqY0p67eJ3Y11JKuqda35yZDSDQkk1twfu/gxrsZd2JL7NJJ8JySeOyNsT1u W50AkHbvYGVwGZFF+pTgs4vvFcjoUas/F6qk5nLAPF/9meVH3GUE1zri5XlslPPOVGDQ W712DL2XajX/YQvG80o+336CQcCcs8p+GupEkML0ZUngmziCl21VBh8sp7BvQz+Yb9uV GdXw== 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=FtFU7s0OE9g+HVGgtXqebVqKRLtvfz7dny9VpSwM+gI=; fh=l8/n/W5i7z81h5FD9Kj1U/CuCFTc2BinYUZq3V7aXdQ=; b=sPUFr38l7gH9NxwXoKsHw0XJB7muS7FT2Gu0gLruJMdEpukJp7Y6Q1oXS2TvKWplCn 1UmCdZBbvqIZThQNJv+z8U1LkQta9HZ58LO42GXBL5SQ2RAp23v8dR0vTxHhHmcfqEyf PSIb/CrVhQdEce0T9ItjhAz5wSXTnOTIbgGyRTWfQuTaqcSSlh1bi8lpFhJLFbcvT4sj jP+EDSlhMEuzx81pMePH51cfOgNGjvYRucfOgvwEyJzjhNZePH0KevTnIUMowHl5o2GE PMb3emIticT7Rem0iasg3L1WmalB9ki0xypcNDP+RlOqqwbUp/KKwm2O9wGH9bwtTzGN hPiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+8SL2uy; 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 af79cd13be357-798ab902d14si914189985a.252.2024.06.17.00.13.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Jun 2024 00:13:11 -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=Z+8SL2uy; 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 1sJ6XZ-0005ke-Qa; Mon, 17 Jun 2024 03:12:33 -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 1sJ6XY-0005U9-GP for qemu-devel@nongnu.org; Mon, 17 Jun 2024 03:12:32 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJ6XW-0002IS-Kn for qemu-devel@nongnu.org; Mon, 17 Jun 2024 03:12:32 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a6f7720e6e8so105252866b.3 for ; Mon, 17 Jun 2024 00:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718608348; x=1719213148; 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=FtFU7s0OE9g+HVGgtXqebVqKRLtvfz7dny9VpSwM+gI=; b=Z+8SL2uyAsnQXzhc4fvB8KC84Fg83RTEVzqAwNo10dmDt/Nvc/SHDDeFlHPbpqZZ+F LuCzaYrnqHVMDTqSWjnpyUPPqRIDIqWDZvXLEaMjic8ypAl/axT0wvKjSnjYfgBT8uTJ sjx4SUFfD4+/CyvLXYE/Lv5UBOGqxj3F+nQ2rxBoh+O0yQis+qTGHhdTqA66leh79f9D 3KamfgdBjXSXeQByDk2eT5TrLvWlF+5+4+JQ9obmqG8tllMPMK6MjT7rh5vTcFwOWr42 B0fsR85GvMdFbZVp/G1hno8R0BZ5WKdJX6cvkRqN0GeSErznbBXXbIEyZJBgCv5S9vy/ LlIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718608348; x=1719213148; 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=FtFU7s0OE9g+HVGgtXqebVqKRLtvfz7dny9VpSwM+gI=; b=Nltmn0cnxC6NjIB08p9mhnmwab4tF5SzyUGd6r+Vfsjqsnql3RDhrzB8o2qRUnXnNf GDBMVsLzV8fT4oS4RJDvx+EgGhjKIJw2tOVOJL4EF6nwYdKrY9CG/5sAV7ndjoNNylfU kCmQ820wYN9+g9bCC2A87dMoQAJuvrs+j+D6YHe+VH9/TpAL0qtFktMpxiMpsmATacB1 JxThXM+StdhA7MVuJa757f6uvLWXA1S/2ci2QaU5oM3fkbPVW+gKH3RbWesZw+HW0DOX I2AIsv74O/DTkd93JdEiDK/m77QMWtjFvsxZUOP9HvAI8ASBLxGu5KLqKJdSdv6HFQ/e cEMg== X-Gm-Message-State: AOJu0YywdTdITGjRhT2WoR0n3I857ZPq20KV0Dn7sXXXGznjqrj/I1lE O4YukWZlcn/vXDQtrA6Ed2VClh0e2n5Enw5WGHLpC4XDWAvc9jWmYuJfBKvStYRuhFgSVP87Mc0 nXQI= X-Received: by 2002:a17:906:710f:b0:a6f:5120:3a30 with SMTP id a640c23a62f3a-a6f60dc4ffamr707532566b.60.1718608348266; Mon, 17 Jun 2024 00:12:28 -0700 (PDT) Received: from m1x-phil.lan ([176.176.169.90]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ed379esm491850466b.139.2024.06.17.00.12.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 17 Jun 2024 00:12:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu Subject: [PATCH v6 12/23] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Date: Mon, 17 Jun 2024 09:11:07 +0200 Message-ID: <20240617071118.60464-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240617071118.60464-1-philmd@linaro.org> References: <20240617071118.60464-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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)