[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] public/x86: don't include common xen.h from arch-specific one
commit ce6c6a697edf40763a8512369672a399821b17bf Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Wed Jul 31 12:39:35 2024 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Jul 31 12:39:35 2024 +0200 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@xxxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/include/public/arch-x86/xen.h | 2 -- xen/include/xen/lib/x86/cpu-policy.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/include/public/arch-x86/xen.h b/xen/include/public/arch-x86/xen.h index a9a87d9b50..fc24879866 100644 --- 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__ diff --git a/xen/include/xen/lib/x86/cpu-policy.h b/xen/include/xen/lib/x86/cpu-policy.h index d26012c6da..f43e1a3b21 100644 --- a/xen/include/xen/lib/x86/cpu-policy.h +++ b/xen/include/xen/lib/x86/cpu-policy.h @@ -439,7 +439,7 @@ void x86_cpu_policy_fill_native(struct cpu_policy *p); void x86_cpu_policy_clear_out_of_range_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 -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |