From: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: nicola.vetrini@bugseng.com, consulting@bugseng.com,
"Simone Ballarin" <simone.ballarin@bugseng.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 05/17] xen/x86: address violations of MISRA C:2012 Directive 4.10
Date: Tue, 09 Jul 2024 09:38:57 +0200 [thread overview]
Message-ID: <20ad12e8beec50aaa58305ee5f376e21@bugseng.com> (raw)
In-Reply-To: <09bc4d2e-b4fb-428b-b0e3-266952ebd3c5@suse.com>
On 2024-07-01 16:21, Jan Beulich wrote:
> On 01.07.2024 15:36, Alessandro Zucchelli wrote:
>> --- a/xen/arch/x86/Makefile
>> +++ b/xen/arch/x86/Makefile
>> @@ -260,17 +260,18 @@ $(objtree)/arch/x86/include/asm/asm-macros.h:
>> $(obj)/asm-macros.i $(src)/Makefil
>> $(call filechk,asm-macros.h)
>>
>> define filechk_asm-macros.h
>> + guard=$$(echo ASM_${SRCARCH}_ASM_MACROS_H | tr a-z A-Z); \
>
> Nit: Hard tab slipped in.
>
>> + echo '#ifndef $$guard'; \
>> + echo '#define $$guard'; \
>> echo '#if 0'; \
>> echo '.if 0'; \
>> echo '#endif'; \
>> - echo '#ifndef __ASM_MACROS_H__'; \
>> - echo '#define __ASM_MACROS_H__'; \
>> echo 'asm ( ".include \"$@\"" );'; \
>> - echo '#endif /* __ASM_MACROS_H__ */'; \
>> echo '#if 0'; \
>> echo '.endif'; \
>> cat $<; \
>> - echo '#endif'
>> + echo '#endif'; \
>> + echo '#endif /* $$guard */'
>> endef
>>
>> $(obj)/efi.lds: AFLAGS-y += -DEFI
>> --- a/xen/arch/x86/cpu/cpu.h
>> +++ b/xen/arch/x86/cpu/cpu.h
>> @@ -1,3 +1,6 @@
>> +#ifndef X86_CPU_CPU_H
>> +#define X86_CPU_CPU_H
>
> This, ...
>
>> --- a/xen/arch/x86/x86_64/mmconfig.h
>> +++ b/xen/arch/x86/x86_64/mmconfig.h
>> @@ -5,6 +5,9 @@
>> * Author: Allen Kay <allen.m.kay@intel.com> - adapted from linux
>> */
>>
>> +#ifndef X86_64_MMCONFIG_H
>> +#define X86_64_MMCONFIG_H
>
> ... this, and ...
>
>> --- a/xen/arch/x86/x86_emulate/private.h
>> +++ b/xen/arch/x86/x86_emulate/private.h
>> @@ -6,6 +6,9 @@
>> * Copyright (c) 2005-2007 XenSource Inc.
>> */
>>
>> +#ifndef X86_X86_EMULATE_PRIVATE_H
>> +#define X86_X86_EMULATE_PRIVATE_H
>
> ... this guard can't possibly all follow the same proposed naming
> scheme
> (wherever the final version of that is being recorded; I don't recall
> it
> having gone in, and I didn't spot anything earlier in the series); at
> least one must be wrong.
For x86/x86_64/mmconfig.h has been made an exception as stated in the
commit
message:
Note that in x86_64/mmconfig.h we slightly deviate from the naming
convention in place: instead of having the inclusion guard as
X86_X86_64_MMCONFIG_H we shortened the directory prefix as X86_64 for
the sake of readability.
If you do not agree with this exception and you prefer to keep the
additional
X86_ prefix let me know so as I prepare the patch series V5 I may
reintroduce it.
Best regards,
--
Alessandro Zucchelli, B.Sc.
Software Engineer, BUGSENG (https://bugseng.com)
next prev parent reply other threads:[~2024-07-09 7:39 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 [this message]
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
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=20ad12e8beec50aaa58305ee5f376e21@bugseng.com \
--to=alessandro.zucchelli@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=consulting@bugseng.com \
--cc=jbeulich@suse.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.