[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] x86: Address violations of MISRA C:2012 and drop bool_t


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Aug 2023 10:44:33 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=qoSFqZUl37POL6Jmc8YM33HSyUXquFBuoSRoCHzIMJc=; b=SmFVe0qpaLIjOEmRILRGMz79ViXepN/V++vhSDKhSttowDtuHUM3H2/mgFHKMsufWzrl81f+69Sqn8jWh7ANTKS16PMQdb09u+A11uvz4frFWhAkX0TtIA2hYycY6FcjG2aQoorKjtPJeMaqRJp3K+W36S5dYhyjgi/KPeHEGlSQ5tZNvlld8SYmRgdPVZMpyUiNGXagzLdv6CWCTeASxgsoJZ5Bs1uJ9aosqMxXwxYoH30BL6dUZs7dGVnTOp+BHqJTH++MGSxReVlwJQV+SXRMA+7xp0DBZdHdQjhzTOzsJRXDu7yWl+BMxl9bk00SVgLupVs/A/mNKeucqXitrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UIFPR2QqIEEutfCvVVCHV8pERwpT43xiyOMiiq290T1csfXdhPKROBQEjg6C/zxGFMlv3BAOPS3sk0UP0D1mqPc5xRr75FliDL/Rp0TfbOqy/blAt7ASor4Ade6WSzIFIsdwhQtPyyYT8OFFXCCAVUMsAbPCgxxEdaa8ktmz/YOT3OUktCoNGB/TUKv95wpptGC9mqoyNL8UBuL3JisaQ9jAoNjyXN5nLhVDjgo3d4Rbe0rGnQZqYQczQHa2RUbVC4gd7oh9fc3yRNdmlKMrrsy3CB03LhSxvsEwr+vhjmaDVMfZPZ0M7OjKeYXuf42QEVauwN415kXf8EbTsrQLwQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, 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>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 07 Aug 2023 08:44:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.08.2023 16:11, 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.

Hmm, I read the title as a promise that bool_t would be gone from the
code base (which I couldn't really believe). Perhaps "... by replacing
bool_t uses"?

> --- 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);
>  
>  /* pku: Flag to enable Memory Protection Keys (default on). */
> -static bool_t opt_pku = 1;
> +static bool opt_pku = 1;
>  boolean_param("pku", opt_pku);

In both cases this also wants switching to "true". Happy to make that
adjustment while committing (together with whatever adjustment to the
title you'd prefer), at which point:
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.