[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BUGGY] Re: [XEN PATCH] x86: Address violations of MISRA C:2012 and drop bool_t
- To: Federico Serafini <federico.serafini@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Mon, 7 Aug 2023 13:31:33 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G7p/gEpThY1ch+U/eJJhsdFuuB+Q1peLfyB3S+sdRIw=; b=kjWyRVLQYu3TXoPzedhjonlvCaZ11SqpbYL7Uvg8dikm1Prj3uDnV1379SxhLm541M1dghF1sb98YOGCXQATb8mYODhd1Ey4fKg0oadW2YYyOyobaULvgLyf0qOLvOtGPgKwEQcA5Jdc1In/EcFxDY7rK4qpHNtMv4dXWct2wAbymwRe1TFmdneWJz0m30UvtKHJIJbt9Ryevl8JuxlGdemtEIPeFsEMTzNy8E0vdqAbIN+VtlMOP2AtM7o5ZJ2UpmRsCtvRZEyLr9tExN0vlz9Ur5V/qQawH1JDh5668ggjqZJ1OPufyiPXgN1QRMaRHKtdJ/1nLY+64GQko3B/sA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mvbz0KS/YxkCDAlvhsrIALRiQqEfaBGNJLUt+bMNyDFzVl6dJkPuGUy1Ueku7E9t4iKIYQ1pAzHkreT7fm5VoIl2OPK5w6PJptRSLFS7HomHToXIyowp+G3Q/dCLVk/Ay7zIk7pPMyj1NU0kxBA4tKBJO5HFhzAwQso0h5vHI0TepOl8oTClp7eWsmIZt+Ar0l9YgJ4rYxBhzjY45AI6gdsH8Vw6cedOiADOyDxWRAUvufXpq1txTqH+DVGcxYCr8mtkyrZ6VhiIdscC2nSws1sq6bc02ay5qKAstqEE+XZOgyr9/fYOKGXWp7Njnl5/pRuLQN/2OZMU4gCaXbM+fA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: consulting@xxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
- Delivery-date: Mon, 07 Aug 2023 12:32:15 +0000
- Ironport-data: A9a23:uU0twqwQxlW9Bc1op9l6t+dwxirEfRIJ4+MujC+fZmUNrF6WrkVRn DFMWmnTb6mCZzfwfN4kPIjlpkIG7cfXn9dmSAZk/iAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8EoHUMja4mtC5QRuPa8T5TcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KUV+0 s03cysGVA/Zm9Ko8pafWOdxiP12eaEHPKtH0p1h5RfwKK9/BLvkGuDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvjaVlVMpuFTuGIO9ltiibMNZhEuH4 EnB+Hz0GE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ussion <xen-devel.lists.xenproject.org>
On 04/08/2023 3:11 pm, Federico Serafini wrote:
> Give a name to unnamed parameters to address violations of
> MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with
> named parameters").
> Keep consistency between object and function declarations 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").
> Replace the occurrences of bool_t with bool.
>
> No functional change.
>
> Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
> ---
> xen/arch/x86/cpu/common.c | 6 +++---
> xen/arch/x86/include/asm/processor.h | 16 ++++++++--------
> 2 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
> index cfcdaace12..5f29148416 100644
> --- a/xen/arch/x86/cpu/common.c
> +++ b/xen/arch/x86/cpu/common.c
> @@ -26,11 +26,11 @@
>
> bool __read_mostly opt_dom0_cpuid_faulting = true;
>
> -bool_t opt_arat = 1;
> +bool opt_arat = 1;
> boolean_param("arat", opt_arat);
I see this has been committed, but you do realise you've created a new
violation of 8.3 by failing to change the declaration of opt_arat to be
bool ?
Please everyone be more careful. There is an enormous amount of MISRA
churn, and it's hard enough to deal with this when the patches are correct.
~Andrew
|