From nobody Thu May 16 07:37:11 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; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1689930326982794.8971870870917; Fri, 21 Jul 2023 02:05:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.567426.886456 (Exim 4.92) (envelope-from ) id 1qMm4H-0001zZ-2M; Fri, 21 Jul 2023 09:04:57 +0000 Received: by outflank-mailman (output) from mailman id 567426.886456; Fri, 21 Jul 2023 09:04:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qMm4G-0001zS-Vq; Fri, 21 Jul 2023 09:04:56 +0000 Received: by outflank-mailman (input) for mailman id 567426; Fri, 21 Jul 2023 09:04: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 1qMm4F-0001zM-Jl for xen-devel@lists.xenproject.org; Fri, 21 Jul 2023 09:04:55 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a82f50ad-27a5-11ee-b23a-6b7b168915f2; Fri, 21 Jul 2023 11:04:54 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.162.18.33]) by support.bugseng.com (Postfix) with ESMTPSA id 8C7B94EE0C89; Fri, 21 Jul 2023 11:04:52 +0200 (CEST) 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: a82f50ad-27a5-11ee-b23a-6b7b168915f2 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Michal Orzel , Xenia Ragiadakou , Ayan Kumar Halder Subject: [XEN PATCH] x86/cpu-policy: address violations of MISRA C:2012 Rule 8.3 on parameter names Date: Fri, 21 Jul 2023 11:04:45 +0200 Message-Id: <912cfe8f5b043bddc80cbf9f75cc0b35e02a6ecd.1689929894.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1689930329895100001 Content-Type: text/plain; charset="utf-8" Change parameter names in function declarations to be consistent with the ones used in the correponding definitions, thus addressing violations of MISRA C:2012 Rule 8.3: "All declarations of an object or function shall use the same names and type qualifiers". No functional changes. Signed-off-by: Federico Serafini Acked-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/include/xen/lib/x86/cpu-policy.h | 29 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/xen/include/xen/lib/x86/cpu-policy.h b/xen/include/xen/lib/x86= /cpu-policy.h index 6d5e9edd26..bab3eecda6 100644 --- a/xen/include/xen/lib/x86/cpu-policy.h +++ b/xen/include/xen/lib/x86/cpu-policy.h @@ -451,23 +451,24 @@ typedef xen_msr_entry_t msr_entry_buffer_t[]; * Serialise the CPUID leaves of a cpu_policy object into an array of cpuid * leaves. * - * @param policy The cpu_policy to serialise. - * @param leaves The array of leaves to serialise into. - * @param nr_entries The number of entries in 'leaves'. + * @param p The cpu_policy to serialise. + * @param leaves The array of leaves to serialise into. + * @param nr_entries_p The number of entries in 'leaves'. * @returns -errno * * Writes at most CPUID_MAX_SERIALISED_LEAVES. May fail with -ENOBUFS if = the * leaves array is too short. On success, nr_entries is updated with the * actual number of leaves written. */ -int x86_cpuid_copy_to_buffer(const struct cpu_policy *policy, - cpuid_leaf_buffer_t leaves, uint32_t *nr_entr= ies); +int x86_cpuid_copy_to_buffer(const struct cpu_policy *p, + cpuid_leaf_buffer_t leaves, + uint32_t *nr_entries_p); =20 /** * Unserialise the CPUID leaves of a cpu_policy object into an array of cp= uid * leaves. * - * @param policy The cpu_policy to unserialise into. + * @param p The cpu_policy to unserialise into. * @param leaves The array of leaves to unserialise from. * @param nr_entries The number of entries in 'leaves'. * @param err_leaf Optional hint for error diagnostics. @@ -481,7 +482,7 @@ int x86_cpuid_copy_to_buffer(const struct cpu_policy *p= olicy, * No content validation of in-range leaves is performed. Synthesised dat= a is * recalculated. */ -int x86_cpuid_copy_from_buffer(struct cpu_policy *policy, +int x86_cpuid_copy_from_buffer(struct cpu_policy *p, const cpuid_leaf_buffer_t leaves, uint32_t nr_entries, uint32_t *err_leaf, uint32_t *err_subleaf); @@ -489,22 +490,22 @@ int x86_cpuid_copy_from_buffer(struct cpu_policy *pol= icy, /** * Serialise the MSRs of a cpu_policy object into an array. * - * @param policy The cpu_policy to serialise. - * @param msrs The array of msrs to serialise into. - * @param nr_entries The number of entries in 'msrs'. + * @param p The cpu_policy to serialise. + * @param msrs The array of msrs to serialise into. + * @param nr_entries_p The number of entries in 'msrs'. * @returns -errno * * Writes at most MSR_MAX_SERIALISED_ENTRIES. May fail with -ENOBUFS if t= he * buffer array is too short. On success, nr_entries is updated with the * actual number of msrs written. */ -int x86_msr_copy_to_buffer(const struct cpu_policy *policy, - msr_entry_buffer_t msrs, uint32_t *nr_entries); +int x86_msr_copy_to_buffer(const struct cpu_policy *p, + msr_entry_buffer_t msrs, uint32_t *nr_entries_p= ); =20 /** * Unserialise the MSRs of a cpu_policy object from an array of msrs. * - * @param policy The cpu_policy object to unserialise into. + * @param p The cpu_policy object to unserialise into. * @param msrs The array of msrs to unserialise from. * @param nr_entries The number of entries in 'msrs'. * @param err_msr Optional hint for error diagnostics. @@ -518,7 +519,7 @@ int x86_msr_copy_to_buffer(const struct cpu_policy *pol= icy, * * No content validation is performed on the data stored in the policy obj= ect. */ -int x86_msr_copy_from_buffer(struct cpu_policy *policy, +int x86_msr_copy_from_buffer(struct cpu_policy *p, const msr_entry_buffer_t msrs, uint32_t nr_en= tries, uint32_t *err_msr); =20 --=20 2.34.1