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

Re: [XEN PATCH 06/13] x86/EFI: address violations of MISRA C:2012 Directive 4.10


  • To: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, sstabellini@xxxxxxxxxx
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 29 Aug 2023 15:27:42 +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=bDsJl1p7wFHuZpD7gsWmAvch0per+E9iV1L9ki3wsto=; b=TFrhEGw4kd6MYrsrb1eFXHlX8r31g/HVylaw6lVTRC8FvA0UsBVXRq0nWi3xKoxTw3zv7AwJXPgfY38JVf6yoRwZrvJlzTJKXFKHyf8AyO38PutWsAGGzFjukeP+mJV73t84esISijltVYLkSYJieTKD/uOa89w9Xf+LpHcR5b4VS9HY2YJc+Wf2bbIIXnSCeGHeKr2YvFlbakAed7rjU3swYzC7iOaUFk2EpmpXscMuTAVqtoLVqOer6FJU0lFy8JhxLCI0/jugcPbd8EgAVVhixsGOc5C/2Ae8VXsOCeUSIfhEaHXmbkqw50O7QbmR/aO1ycjA6XSoQA5TovPEIg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PpQ7/6r4jW6g/N++xZDvQq0ySRzey1U3/LBnmkdXVIxs+wZTtTB4RMPDkHaIS6ZkaVF1PMIqXbbR5aPISj+37bXO4g/sHYSsZTYAAb+wFODXPk+oIRvxBDWUx1+Dt5wktJLhta1uETTXxs/560wLZORsqE5wRxs0hhHF4RuE2waNQc4bBBYdIiDrnvygbdgWrSBgAO5HjhYiM8HFg3ajILw8IS1nVg4hJEw5pYu1UJNoU78uj7lSbi3T/s2vDDerDqSuCd2k52SkjFAIZrpIraF3U/Cr55jt3sdR+4ETaAAbXDuRQd4Wuxcoe00Zyitf2OTpkGMgT3dNuEwyljmeLQ==
  • 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>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 29 Aug 2023 13:27:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.08.2023 15:20, Simone Ballarin wrote:
> Add inclusion guards to address violations of
> MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order
> to prevent the contents of a header file being included more than
> once").
> 
> Mechanical change.
> 
> Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>
> ---
>  xen/arch/x86/efi/efi-boot.h | 6 ++++++
>  xen/arch/x86/efi/runtime.h  | 5 +++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h
> index 92f4cfe8bd..2c6be062cc 100644
> --- a/xen/arch/x86/efi/efi-boot.h
> +++ b/xen/arch/x86/efi/efi-boot.h
> @@ -3,6 +3,10 @@
>   * is intended to be included by common/efi/boot.c _only_, and
>   * therefore can define arch specific global variables.
>   */
> +
> +#ifndef __X86_EFI_EFI_BOOT_H__
> +#define __X86_EFI_EFI_BOOT_H__

Considering the comment, I find the need for a guard here quite
"interesting", to be honest.

Jan



 


Rackspace

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