All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: xen-devel@lists.xenproject.org, nicola.vetrini@bugseng.com,
	consulting@bugseng.com,
	"Simone Ballarin" <simone.ballarin@bugseng.com>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH 06/17] x86/EFI: address violations of MISRA C:2012 Directive 4.10
Date: Mon, 01 Jul 2024 16:36:17 +0200	[thread overview]
Message-ID: <a61beb685bea459c0035ae77a5d05fbc@bugseng.com> (raw)
In-Reply-To: <ZoK4f8wUdusqW_fA@mail-itl>

On 2024-07-01 16:09, Marek Marczykowski-Górecki wrote:
> On Mon, Jul 01, 2024 at 03:36:01PM +0200, Alessandro Zucchelli wrote:
>> From: Simone Ballarin <simone.ballarin@bugseng.com>
>> 
>> Add inclusion guard 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@bugseng.com>
>> Signed-off-by: Maria Celeste Cesario 
>> <maria.celeste.cesario@bugseng.com>
>> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
>> Signed-off-by: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
>> 
>> ---
>> Changes in v4:
>> - Modified inclusion guard.
>> Changes in v3:
>> - remove trailing underscores
>> - change inclusion guard name to adhere to the new standard
>> Changes in v2:
>> - remove changes in "xen/arch/x86/efi/efi-boot.h"
>> 
>> Note:
>> Changes in efi-boot.h have been removed since the file is
>> intenteded to be included by common/efi/boot.c only. This motivation
>> is not enough to raise a deviation record, so the violation is
>> still present.
> 
> I'm confused by this comment. It says changes in efi-boot.h have been
> removed, yet the patch does include them.

The note referes to the "Changes in v2".
You can ignore it.

> 
>> ---
>>  xen/arch/x86/efi/efi-boot.h | 7 +++++++
>>  xen/arch/x86/efi/runtime.h  | 5 +++++
>>  2 files changed, 12 insertions(+)
>> 
>> diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h
>> index f282358435..c6be744f2b 100644
>> --- a/xen/arch/x86/efi/efi-boot.h
>> +++ b/xen/arch/x86/efi/efi-boot.h
>> @@ -3,6 +3,11 @@
>>   * 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
>> +
>> +
>>  #include <xen/vga.h>
>>  #include <asm/e820.h>
>>  #include <asm/edd.h>
>> @@ -912,6 +917,8 @@ void asmlinkage __init efi_multiboot2(EFI_HANDLE 
>> ImageHandle,
>>      efi_exit_boot(ImageHandle, SystemTable);
>>  }
>> 
>> +#endif /* X86_EFI_EFI_BOOT_H */
>> +
>>  /*
>>   * Local variables:
>>   * mode: C
>> diff --git a/xen/arch/x86/efi/runtime.h b/xen/arch/x86/efi/runtime.h
>> index 77866c5f21..88ab5651e9 100644
>> --- a/xen/arch/x86/efi/runtime.h
>> +++ b/xen/arch/x86/efi/runtime.h
>> @@ -1,3 +1,6 @@
>> +#ifndef X86_EFI_RUNTIME_H
>> +#define X86_EFI_RUNTIME_H
>> +
>>  #include <xen/domain_page.h>
>>  #include <xen/mm.h>
>>  #include <asm/atomic.h>
>> @@ -17,3 +20,5 @@ void efi_update_l4_pgtable(unsigned int l4idx, 
>> l4_pgentry_t l4e)
>>      }
>>  }
>>  #endif
>> +
>> +#endif /* X86_EFI_RUNTIME_H */
>> --
>> 2.34.1
>> 

-- 
Alessandro Zucchelli, B.Sc.

Software Engineer, BUGSENG (https://bugseng.com)


  reply	other threads:[~2024-07-01 14:36 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 11:10 [PATCH 00/17] xen: address violation of MISRA C:2012 Directive 4.10 Alessandro Zucchelli
2024-07-01 11:10 ` [PATCH 01/17] misra: add deviation for headers that explicitly avoid guards Alessandro Zucchelli
2024-07-03 12:46   ` Jan Beulich
2024-07-01 11:10 ` [PATCH 02/17] misra: modify deviations for empty and generated headers Alessandro Zucchelli
2024-07-01 11:10 ` [PATCH 03/17] misra: add deviations for direct inclusion guards Alessandro Zucchelli
2024-07-01 14:16   ` Jan Beulich
2024-07-12 22:00     ` Stefano Stabellini
2024-07-01 13:35 ` [PATCH 04/17] xen/arm: address violations of MISRA C:2012 Directive 4.10 Alessandro Zucchelli
2024-07-12 22:09   ` Stefano Stabellini
2024-07-01 13:36 ` [PATCH 05/17] xen/x86: " Alessandro Zucchelli
2024-07-01 14:21   ` Jan Beulich
2024-07-09  7:38     ` Alessandro Zucchelli
2024-07-09  7:45       ` Jan Beulich
2024-07-12 22:09         ` Stefano Stabellini
2024-07-15  7:27           ` Jan Beulich
2024-07-01 13:36 ` [PATCH 06/17] x86/EFI: " Alessandro Zucchelli
2024-07-01 14:09   ` Marek Marczykowski-Górecki
2024-07-01 14:36     ` Alessandro Zucchelli [this message]
2024-07-01 14:11   ` Jan Beulich
2024-07-12 22:10     ` Stefano Stabellini
2024-07-01 13:36 ` [PATCH 07/17] xen/common: " Alessandro Zucchelli
2024-07-01 13:36 ` [PATCH 08/17] xen/efi: " Alessandro Zucchelli
2024-07-01 13:36 ` [PATCH 09/17] xen: " Alessandro Zucchelli
2024-07-03 12:30   ` Jan Beulich
2024-07-12 22:16     ` Stefano Stabellini
2024-07-01 13:36 ` [PATCH 10/17] x86/asm: " Alessandro Zucchelli
2024-07-03 12:49   ` Jan Beulich
2024-07-04  7:50     ` Alessandro Zucchelli
2024-07-01 13:43 ` [PATCH 11/17] xen/arm: " Alessandro Zucchelli
2024-07-12 22:19   ` Stefano Stabellini
2024-07-01 13:43 ` [PATCH 12/17] xen: " Alessandro Zucchelli
2024-07-03 12:51   ` Jan Beulich
2024-07-04  8:14     ` Alessandro Zucchelli
2024-07-01 13:45 ` [PATCH 13/17] xen: add deviations for MISRA C 2012 Dir D4.10 Alessandro Zucchelli
2024-07-12 22:22   ` Stefano Stabellini
2024-07-01 13:45 ` [PATCH 14/17] xen: add SAF deviation for MISRA C Dir 4.10 Alessandro Zucchelli
2024-07-03 13:23   ` Jan Beulich
2024-07-12 22:28     ` Stefano Stabellini
2024-07-22  8:54       ` Alessandro Zucchelli
2024-07-22  9:14         ` Jan Beulich
2024-07-01 13:46 ` [PATCH 15/17] xen/x86: rename inclusion guards for consistency Alessandro Zucchelli
2024-07-03 13:26   ` Jan Beulich
2024-07-01 13:46 ` [PATCH 16/17] xen/build: address violation of MISRA C Directive 4.10 Alessandro Zucchelli
2024-07-03 13:32   ` Jan Beulich
2024-07-01 13:46 ` [RFC PATCH 17/17] CODING_STYLE: Add a section on header guards naming conventions Alessandro Zucchelli
2024-07-03 13:48   ` Jan Beulich
2024-07-12 22:38     ` Stefano Stabellini
2024-07-15  7:23       ` Jan Beulich
2024-07-15  9:08         ` Alessandro Zucchelli
2024-07-16  0:43         ` Stefano Stabellini
2024-07-16  7:17           ` Jan Beulich
2024-07-17  0:20             ` Stefano Stabellini
2024-07-17 10:24               ` Jan Beulich
2024-07-17 23:02                 ` Stefano Stabellini
2024-07-18  8:59                   ` Jan Beulich
2024-07-18 22:01                     ` Stefano Stabellini
2024-07-19  9:05                       ` Jan Beulich
2024-07-19 15:21                         ` Stefano Stabellini
2024-07-22  6:56                           ` Alessandro Zucchelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a61beb685bea459c0035ae77a5d05fbc@bugseng.com \
    --to=alessandro.zucchelli@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=consulting@bugseng.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=jbeulich@suse.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=nicola.vetrini@bugseng.com \
    --cc=roger.pau@citrix.com \
    --cc=simone.ballarin@bugseng.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.