From nobody Thu Oct 30 18:58:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1760307631; cv=none; d=zohomail.com; s=zohoarc; b=eEY5eStz0+tDTAA4C6v0RxT4RiTsldjX7ALE2zSn23pwOzc0CGmbk52l9g0qiXg9R9yOYGUfEsYMv8S6IeBI30tktkU8nP10p7dHbUpbCUcBuDmrhev0UdqQaAS23ZXkY/SvYomEmEocJzZOXnSYIZVN3eVuaPBTtrcwS4Ruhfo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760307631; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CsJNxUuSl4LuFWIkY3r/r8GkJM+W7X9q9hvMbyMhgl0=; b=OOzDzMb1hU96/VGGAoNpQ5h0zWqc4VBulGgq33J74gF7tVz238VaRYttiLaZixxRhs8iKb6Zr/LXIKmgHn3L9H0/2xihCvITECrweAl+fGRwHDBNM+JT6f+FqLTz5YFGq6Xuwiv46rk7Bt1sfL32UkFIZTX7k+ze+qTlNZ15iVs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1760307631361128.91011732774302; Sun, 12 Oct 2025 15:20:31 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1141653.1475825 (Exim 4.92) (envelope-from ) id 1v84Pz-00012g-Hc; Sun, 12 Oct 2025 22:19:55 +0000 Received: by outflank-mailman (output) from mailman id 1141653.1475825; Sun, 12 Oct 2025 22:19:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1v84Pz-00012Y-Cv; Sun, 12 Oct 2025 22:19:55 +0000 Received: by outflank-mailman (input) for mailman id 1141653; Sun, 12 Oct 2025 22:19:55 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1v84Py-00012S-S7 for xen-devel@lists.xenproject.org; Sun, 12 Oct 2025 22:19:54 +0000 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [2a00:1450:4864:20::32d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 91c030d7-a7b9-11f0-9d15-b5c5bf9af7f9; Mon, 13 Oct 2025 00:19:53 +0200 (CEST) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-46f9d1b186dso3609335e9.3 for ; Sun, 12 Oct 2025 15:19:50 -0700 (PDT) Received: from lab.home (dynamic-2a00-1028-83a4-4bca-c0bb-96ff-feed-9d50.ipv6.o2.cz. [2a00:1028:83a4:4bca:c0bb:96ff:feed:9d50]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46fb482b9absm174770605e9.2.2025.10.12.15.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Oct 2025 15:19:48 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 91c030d7-a7b9-11f0-9d15-b5c5bf9af7f9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760307590; x=1760912390; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CsJNxUuSl4LuFWIkY3r/r8GkJM+W7X9q9hvMbyMhgl0=; b=clPa87PdqlMeWsiXliAh6ZdSknyyjyf9E4292WMceWWOmedtCy2qwiDVAxuFLFu3+y dBrhkVd1ossdVBNlhN+a/GGZioSQeHmd1tgnbMweTAT4t81u8RQKy1NrW8U7Vn+nkKu5 7lg9sICw7D+kMVXBSwnE+/cr+0Nwps/utMucNa9cANxLlTTO2pDM1+EZq/T0J35zXHX9 HYgYDU72c0tiAfKW3IMNFIyCfENq7h6oOCoKIMCp8wPynoWVTcLMaF/H/rd/5zt6DsfA Vx4kdTOluqxIeR/QQLlfv21NCK2KuUongG4K7QbbTY1jwKvbTczqw7WbSILWEuHpwJVQ CRUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760307590; x=1760912390; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CsJNxUuSl4LuFWIkY3r/r8GkJM+W7X9q9hvMbyMhgl0=; b=ffTlH2NrOlMrRacDKjVQWgjt85BGwu9t4VpZ+FrnbpcXohYvMoMMB1zrAhtjVVxrXb KM/dzkrE/SLh9uedRSir7vPujLK5UyzOvvjUzTTmE7Mg/p84MayYkC9AXtFqLFllhBd9 yKipMKCokCXZ/ud8qpOVRtHymVCXp1gYoUuBXrBv7YRCgwkcjtXidH3fhiuzgJ9okrCS aMrD1ZdilV5jPjUyjfnsHQp7ZH0ts/OOENCJ1rKEW/JwlNBqGC+2hlvXuVUY/zhWoSFo TUqrCEuObvUwpvRy0WpJsglQ+YmhtGoPaYG5bWdZtU/sy5j/SE60hwDyKiIh7U+xfLND yU7g== X-Gm-Message-State: AOJu0YySwoJVf8RfSCJA3+aM0Y0zBILTA6npyNCIdfgHRCja7W5b/Sqe z3r/CVOH4y3J03hsao9y4CfDyBTVCmIrUJVVmQpBP/hHddLuZzE6FLtX8tY4Ew== X-Gm-Gg: ASbGncvVKiT7hVnl5IzKHzR04D6aeIt/i9YTHlSZ0HlR//n0d9UsAzshpmEwE6AWeZl Zvb0C42X0ohhoMt+OO43tkyHTyWQ664qLQZB6pY3wBTWmz1TmIHrl4IRE9W9EMRNg8psmAKgOoV bfZ7SNJWPxV0qtmf1uXeCiiH9GLrk8JLnIeJ/29Y75usSbh8cgU/Gs2QoI9KILdMeSg5rnm/pWI GkSqzcfnwSLT1NwNUPKKQukXdtK+hxCz7cbGoPNZfHmg8Zlwr5Tsq3tiY0XJy0Ay+HqAYTot1Pz 1iwfJ2yymtJV14BVnJWbABDPg2Y/Qq0p1SPN3INe4DyDVhaX5foyR0Vab0+bEhoao4NnzPfLufv +0o58NaHhfwSpXM/WjcYGjnAscq4ceVqGdmHYtjxQI4DqGuS6smaR0+IUvmpKEPfzkI0BUXH+FF CpOV9Or31ZVKQ9by4ENmb51J/IGkEX7NopyLC4Kdgs6shQS6k2y1+PpZn5WN4uZnI= X-Google-Smtp-Source: AGHT+IGrXBQhGMWxigmIVSzHFXo35rUtOp4ToRJ2k9lOMB15KsOtUEyrB3fZqG+p8UymsRbJf0YHqQ== X-Received: by 2002:a05:600c:4510:b0:46e:4337:f68e with SMTP id 5b1f17b1804b1-46fa9af8523mr74251605e9.4.1760307589486; Sun, 12 Oct 2025 15:19:49 -0700 (PDT) From: "=?UTF-8?q?Petr=20Bene=C5=A1?=" X-Google-Original-From: =?UTF-8?q?Petr=20Bene=C5=A1?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Petr=20Bene=C5=A1?= , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Anthony PERARD , teddy.astie@vates.tech Subject: [PATCH for-4.21] hvmloader: change constants to hex format in size checks Date: Sun, 12 Oct 2025 22:19:40 +0000 Message-Id: <87399e2646ea89eeb0550bd08a408dbff5706540.1760307495.git.w1benny@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1760307633398158500 From: Petr Bene=C5=A1 Match the number format the specification gives. No functional change. Signed-off-by: Petr Bene=C5=A1 Suggested-By: --- tools/firmware/hvmloader/smbios.c | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/firmware/hvmloader/smbios.c b/tools/firmware/hvmloader/s= mbios.c index 76c7090d16..33ac2eee1a 100644 --- a/tools/firmware/hvmloader/smbios.c +++ b/tools/firmware/hvmloader/smbios.c @@ -647,7 +647,7 @@ smbios_type_3_init(void *start) * which corresponds with the end of the "Security Status" field. */ =20 - BUILD_BUG_ON(endof_field(struct smbios_type_3, security_status) !=3D 1= 3); + BUILD_BUG_ON(endof_field(struct smbios_type_3, security_status) !=3D 0= x0d); =20 next =3D smbios_pt_copy(start, 3, SMBIOS_HANDLE_TYPE3, offsetof(struct smbios_type_3, security_status)); @@ -706,7 +706,7 @@ smbios_type_4_init( uint32_t eax, ebx, ecx, edx; =20 /* Specification says Type 4 table has length of 23h for v2.3+. */ - BUILD_BUG_ON(sizeof(*p) !=3D 35); + BUILD_BUG_ON(sizeof(*p) !=3D 0x23); =20 memset(p, 0, sizeof(*p)); =20 @@ -757,7 +757,7 @@ static void * smbios_type_7_init(void *start) { /* Specification says Type 7 table has length of 13h for v2.1+. */ - BUILD_BUG_ON(sizeof(struct smbios_type_7) !=3D 19); + BUILD_BUG_ON(sizeof(struct smbios_type_7) !=3D 0x13); =20 /* Only present when passed in. */ return smbios_pt_copy(start, 7, SMBIOS_HANDLE_TYPE7, @@ -769,7 +769,7 @@ static void * smbios_type_8_init(void *start) { /* Specification says Type 8 table has length of 09h. */ - BUILD_BUG_ON(sizeof(struct smbios_type_8) !=3D 9); + BUILD_BUG_ON(sizeof(struct smbios_type_8) !=3D 0x09); =20 /* Only present when passed in. */ return smbios_pt_copy(start, 8, SMBIOS_HANDLE_TYPE8, @@ -781,7 +781,7 @@ static void * smbios_type_9_init(void *start) { /* Specification says Type 9 table has length of 0Dh for v2.1-2.5. */ - BUILD_BUG_ON(sizeof(struct smbios_type_9) !=3D 13); + BUILD_BUG_ON(sizeof(struct smbios_type_9) !=3D 0x0d); =20 /* Only present when passed in. */ return smbios_pt_copy(start, 9, SMBIOS_HANDLE_TYPE9, @@ -799,7 +799,7 @@ smbios_type_11_init(void *start) int i; =20 /* Specification says Type 11 table has length of 05h. */ - BUILD_BUG_ON(sizeof(*p) !=3D 5); + BUILD_BUG_ON(sizeof(*p) !=3D 0x05); =20 next =3D smbios_pt_copy(start, 11, SMBIOS_HANDLE_TYPE11, sizeof(*p)); if ( next !=3D start ) @@ -843,7 +843,7 @@ smbios_type_16_init(void *start, uint32_t memsize, int = nr_mem_devs) struct smbios_type_16 *p =3D start; =20 /* Specification says Type 16 table has length of 0Fh for v2.1-2.7. */ - BUILD_BUG_ON(sizeof(*p) !=3D 15); + BUILD_BUG_ON(sizeof(*p) !=3D 0x0f); =20 memset(p, 0, sizeof(*p)); =20 @@ -871,7 +871,7 @@ smbios_type_17_init(void *start, uint32_t memory_size_m= b, int instance) struct smbios_type_17 *p =3D start; =20 /* Specification says Type 17 table has length of 1Bh for v2.3-2.6. */ - BUILD_BUG_ON(sizeof(*p) !=3D 27); + BUILD_BUG_ON(sizeof(*p) !=3D 0x1b); =20 memset(p, 0, sizeof(*p)); =20 @@ -909,7 +909,7 @@ smbios_type_19_init(void *start, uint32_t memory_size_m= b, int instance) struct smbios_type_19 *p =3D start; =20 /* Specification says Type 19 table has length of 0Fh for v2.1-2.7. */ - BUILD_BUG_ON(sizeof(*p) !=3D 15); + BUILD_BUG_ON(sizeof(*p) !=3D 0x0f); =20 memset(p, 0, sizeof(*p)); =20 @@ -934,7 +934,7 @@ smbios_type_20_init(void *start, uint32_t memory_size_m= b, int instance) struct smbios_type_20 *p =3D start; =20 /* Specification says Type 20 table has length of 13h for v2.1-2.7. */ - BUILD_BUG_ON(sizeof(*p) !=3D 19); + BUILD_BUG_ON(sizeof(*p) !=3D 0x13); =20 memset(p, 0, sizeof(*p)); =20 @@ -966,7 +966,7 @@ smbios_type_22_init(void *start) void *next; =20 /* Specification says Type 22 table has length of 1Ah. */ - BUILD_BUG_ON(sizeof(*p) !=3D 26); + BUILD_BUG_ON(sizeof(*p) !=3D 0x1a); =20 next =3D smbios_pt_copy(start, 22, SMBIOS_HANDLE_TYPE22, sizeof(*p)); if ( next !=3D start ) @@ -1030,7 +1030,7 @@ smbios_type_26_init(void *start) * Only present when passed in. */ =20 - BUILD_BUG_ON(endof_field(struct smbios_type_26, oem_defined) !=3D 20); + BUILD_BUG_ON(endof_field(struct smbios_type_26, oem_defined) !=3D 0x14= ); =20 return smbios_pt_copy(start, 26, SMBIOS_HANDLE_TYPE26, endof_field(struct smbios_type_26, oem_defined)); @@ -1047,7 +1047,7 @@ smbios_type_27_init(void *start) * Only present when passed in. */ =20 - BUILD_BUG_ON(endof_field(struct smbios_type_27, oem_defined) !=3D 12); + BUILD_BUG_ON(endof_field(struct smbios_type_27, oem_defined) !=3D 0x0c= ); =20 return smbios_pt_copy(start, 27, SMBIOS_HANDLE_TYPE27, endof_field(struct smbios_type_27, oem_defined)); @@ -1064,7 +1064,7 @@ smbios_type_28_init(void *start) * Only present when passed in. */ =20 - BUILD_BUG_ON(endof_field(struct smbios_type_28, oem_defined) !=3D 20); + BUILD_BUG_ON(endof_field(struct smbios_type_28, oem_defined) !=3D 0x14= ); =20 return smbios_pt_copy(start, 28, SMBIOS_HANDLE_TYPE28, endof_field(struct smbios_type_28, oem_defined)); @@ -1077,7 +1077,7 @@ smbios_type_32_init(void *start) struct smbios_type_32 *p =3D start; =20 /* Specification says Type 32 table has length of at least 0Bh. */ - BUILD_BUG_ON(sizeof(*p) !=3D 11); + BUILD_BUG_ON(sizeof(*p) !=3D 0x0b); =20 memset(p, 0, sizeof(*p)); =20 @@ -1103,7 +1103,7 @@ smbios_type_39_init(void *start) * Only present when passed in. */ =20 - BUILD_BUG_ON(endof_field(struct smbios_type_39, characteristics) !=3D = 16); + BUILD_BUG_ON(endof_field(struct smbios_type_39, characteristics) !=3D = 0x10); =20 return smbios_pt_copy(start, 39, SMBIOS_HANDLE_TYPE39, endof_field(struct smbios_type_39, characteristi= cs)); --=20 2.34.1