From: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: "Jan Beulich" <jbeulich@suse.com>,
consulting@bugseng.com,
"Nicola Vetrini" <nicola.vetrini@bugseng.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 14/17] xen: add SAF deviation for MISRA C Dir 4.10
Date: Mon, 22 Jul 2024 10:54:07 +0200 [thread overview]
Message-ID: <39ca09f9ef0fe1b6ec93371995f2a49a@bugseng.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2407121527500.3635@ubuntu-linux-20-04-desktop>
On 2024-07-13 00:28, Stefano Stabellini wrote:
> On Wed, 3 Jul 2024, Jan Beulich wrote:
>> public/x86: don't include common xen.h from arch-specific one
>>
>> No other arch-*.h does so, and arch-x86/xen.h really just takes the
>> role
>> of arch-x86_32.h and arch-x86_64.h (by those two forwarding there).
>> With
>> xen.h itself including the per-arch headers, doing so is also kind of
>> backwards anyway, and just calling for problems. There's exactly one
>> place where arch-x86/xen.h is included when really xen.h is meant (for
>> wanting XEN_GUEST_HANDLE_64() to be made available, the default
>> definition of which lives in the common xen.h).
>>
>> This then addresses a violation 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").
>>
>> Reported-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
One question: when making the new version of the patch series should I
revert this commit as Jan made the patch for it himself, or should Jan's
fixes
be integrated in the patch series?
Many thanks in advance,
Alessandro Zucchelli
>> --- a/xen/include/public/arch-x86/xen.h
>> +++ b/xen/include/public/arch-x86/xen.h
>> @@ -7,8 +7,6 @@
>> * Copyright (c) 2004-2006, K A Fraser
>> */
>>
>> -#include "../xen.h"
>> -
>> #ifndef __XEN_PUBLIC_ARCH_X86_XEN_H__
>> #define __XEN_PUBLIC_ARCH_X86_XEN_H__
>>
>> --- a/xen/include/xen/lib/x86/cpu-policy.h
>> +++ b/xen/include/xen/lib/x86/cpu-policy.h
>> @@ -525,7 +525,7 @@ void x86_cpu_policy_bound_max_leaves(str
>> void x86_cpu_policy_shrink_max_leaves(struct cpu_policy *p);
>>
>> #ifdef __XEN__
>> -#include <public/arch-x86/xen.h>
>> +#include <public/xen.h>
>> typedef XEN_GUEST_HANDLE_64(xen_cpuid_leaf_t) cpuid_leaf_buffer_t;
>> typedef XEN_GUEST_HANDLE_64(xen_msr_entry_t) msr_entry_buffer_t;
>> #else
>>
>>
--
Alessandro Zucchelli, B.Sc.
Software Engineer, BUGSENG (https://bugseng.com)
next prev parent reply other threads:[~2024-07-22 8:54 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
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 [this message]
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=39ca09f9ef0fe1b6ec93371995f2a49a@bugseng.com \
--to=alessandro.zucchelli@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=consulting@bugseng.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=nicola.vetrini@bugseng.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--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.