From nobody Mon Nov 25 07:00:12 2024 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1715380828; cv=none; d=zohomail.com; s=zohoarc; b=YN/TBE3hSRPIkx6pRf/WkIv9lYMh27p55pY+ripJ0yl2wVyjsc5S/X80lJ9rUB0FUPye2qtiVSjTtQbwf5rbA7+rPYgBOFNKzspD4O3JjdycJivmDTxyrTR+3Ow4Q+U9JYFfAd1OH7kepn+2Vitas/5qufS6SZShxw4Q+44MLw4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715380828; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=r/L62oz/vhjY7sgRvmqLoVnO9fQ3LM/iOAHiRUewZCg=; b=ReTLjdSXVvhm4UUqqN5YLhHoc8BvbwrePAguPBto2RzrraBT1f+l3fJ+Smf+KFzxclRnBc95jBpq7DVFd9pDjj1Dw0Sazd94m6e51Y7T1rjq4g4C8cvRugrX1AuYxCY05FJOug36DIIuMnoDBMLgL1pgoVUadbwBqukHF9r0o3U= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1715380828168431.49221056281647; Fri, 10 May 2024 15:40:28 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.720095.1123106 (Exim 4.92) (envelope-from ) id 1s5YuP-00008Q-6Y; Fri, 10 May 2024 22:40:09 +0000 Received: by outflank-mailman (output) from mailman id 720095.1123106; Fri, 10 May 2024 22:40:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s5YuP-00008J-40; Fri, 10 May 2024 22:40:09 +0000 Received: by outflank-mailman (input) for mailman id 720095; Fri, 10 May 2024 22:40:08 +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 1s5YuO-000872-BY for xen-devel@lists.xenproject.org; Fri, 10 May 2024 22:40:08 +0000 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [2a00:1450:4864:20::533]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3fad9b8d-0f1e-11ef-909d-e314d9c70b13; Sat, 11 May 2024 00:40:06 +0200 (CEST) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-572baf393ddso5879082a12.1 for ; Fri, 10 May 2024 15:40:06 -0700 (PDT) Received: from andrewcoop.citrite.net (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781cf60sm233915866b.14.2024.05.10.15.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 15:40:05 -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: 3fad9b8d-0f1e-11ef-909d-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1715380806; x=1715985606; darn=lists.xenproject.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=r/L62oz/vhjY7sgRvmqLoVnO9fQ3LM/iOAHiRUewZCg=; b=ERuTKkERbxwCLDKkYxFCkSm8wi6CGoMth3NP6SDedM3m8QOLyDGg8Osm8+a2YWwIon 67FJ/F/kpVlvA2lhJSmpeKPecfsvhFfuu9soISFCUVzWmgTlbRpEG0c0f1Bct94ivBbD FbgNyB8WloExS0PvzPN4M/fyQvzpmhG0XK0aM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715380806; x=1715985606; 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=r/L62oz/vhjY7sgRvmqLoVnO9fQ3LM/iOAHiRUewZCg=; b=AIBgRj+GqloqEhR6LdbrjucPTJD15/d7wfMVY6633BmqgaqLsJOEy+89ZTjKsT5Afg fuihdT/w01D74r/A+xEBK0FB8f7S4jrfwE2FbqeTnV1OSdkn4uHHJqcdPSUYfIRxxDBy bWsBDwwQLEVZs5bT7DrAdZLJbdmTn5+Iw4ULD4xFSyECNI5AnbU9R8itxZ43GSGYqBYw rpfZ3B/QjKuCYR0IoakaV2dfDhNsC2YDda0/c/eg1ZcCAkHivnZzGcmfZUC+SlH9/tYO 6yZcTWicSVvndLOZFLaiO6ZgyC1VuqK+AB4Kgvw2pS30hONKFGt612xUuHvS8v/w4tDA 07Ag== X-Gm-Message-State: AOJu0YwxQx3gNODqR3fRjituKynuoJEOBRMdsz0Pc1eG3as4aWXJ8HK+ I1agSNJC6iDxEHfejf0XlW8HARxiQQFekIoWdRgCcjhBHoUMpYIXqplBi6mG42kT3J8pQKtC5iM q X-Google-Smtp-Source: AGHT+IG8gv5M6eQdPRaW5RagjFQLPIwyOi6pGwQ/53qXmVlAW9nj+CYDAo9G7aWsdcVk84ybzUMJUQ== X-Received: by 2002:a17:906:2bc4:b0:a59:ac10:9be5 with SMTP id a640c23a62f3a-a5a2d292b1dmr351577666b.27.1715380805809; Fri, 10 May 2024 15:40:05 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Andrew Cooper , Jan Beulich Subject: [PATCH 2/4] tools/xen-cpuid: Rename decodes[] to leaf_info[] Date: Fri, 10 May 2024 23:40:00 +0100 Message-Id: <20240510224002.2324578-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240510224002.2324578-1-andrew.cooper3@citrix.com> References: <20240510224002.2324578-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1715380828687100001 From: Roger Pau Monn=C3=A9 Split out of subsequent patch to aid legibility. Signed-off-by: Roger Pau Monn=C3=A9 Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monn=C3=A9 --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 v3: * New (split out) --- tools/misc/xen-cpuid.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/misc/xen-cpuid.c b/tools/misc/xen-cpuid.c index 8893547bebce..6ee835b22949 100644 --- a/tools/misc/xen-cpuid.c +++ b/tools/misc/xen-cpuid.c @@ -268,8 +268,7 @@ static const struct { const char *name; const char *abbr; const char *const *strs; -} decodes[] =3D -{ +} leaf_info[] =3D { { "CPUID 0x00000001.edx", "1d", str_1d }, { "CPUID 0x00000001.ecx", "1c", str_1c }, { "CPUID 0x80000001.edx", "e1d", str_e1d }, @@ -336,11 +335,11 @@ static void decode_featureset(const uint32_t *feature= s, if ( !detail ) return; =20 - for ( i =3D 0; i < length && i < ARRAY_SIZE(decodes); ++i ) + for ( i =3D 0; i < length && i < ARRAY_SIZE(leaf_info); ++i ) { - printf(" [%02u] %-"COL_ALIGN"s", i, decodes[i].name ?: "= "); - if ( decodes[i].name ) - dump_leaf(features[i], decodes[i].strs); + printf(" [%02u] %-"COL_ALIGN"s", i, leaf_info[i].name ?: ""); + if ( leaf_info[i].name ) + dump_leaf(features[i], leaf_info[i].strs); printf("\n"); } } @@ -355,8 +354,8 @@ static void dump_info(xc_interface *xch, bool detail) if ( !detail ) { printf(" %"COL_ALIGN"s ", "KEY"); - for ( i =3D 0; i < ARRAY_SIZE(decodes); ++i ) - printf("%-8s ", decodes[i].abbr ?: "???"); + for ( i =3D 0; i < ARRAY_SIZE(leaf_info); ++i ) + printf("%-8s ", leaf_info[i].abbr ?: "???"); printf("\n"); } =20 --=20 2.30.2