From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C3D4C3DA59 for ; Mon, 22 Jul 2024 08:54:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.761553.1171514 (Exim 4.92) (envelope-from ) id 1sVoo8-0005Wn-Fc; Mon, 22 Jul 2024 08:54:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761553.1171514; Mon, 22 Jul 2024 08:54:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVoo8-0005Wg-D1; Mon, 22 Jul 2024 08:54:12 +0000 Received: by outflank-mailman (input) for mailman id 761553; Mon, 22 Jul 2024 08:54:11 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVoo7-0005WY-0b for xen-devel@lists.xenproject.org; Mon, 22 Jul 2024 08:54:11 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f517de61-4807-11ef-8776-851b0ebba9a2; Mon, 22 Jul 2024 10:54:08 +0200 (CEST) Received: from support.bugseng.com (support.bugseng.com [162.55.131.47]) by support.bugseng.com (Postfix) with ESMTPA id D81C54EE0737; Mon, 22 Jul 2024 10:54:07 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f517de61-4807-11ef-8776-851b0ebba9a2 MIME-Version: 1.0 Date: Mon, 22 Jul 2024 10:54:07 +0200 From: Alessandro Zucchelli To: Stefano Stabellini Cc: Jan Beulich , consulting@bugseng.com, Nicola Vetrini , Andrew Cooper , Julien Grall , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , xen-devel@lists.xenproject.org Subject: Re: [PATCH 14/17] xen: add SAF deviation for MISRA C Dir 4.10 Reply-To: alessandro.zucchelli@bugseng.com Mail-Reply-To: alessandro.zucchelli@bugseng.com In-Reply-To: References: Message-ID: <39ca09f9ef0fe1b6ec93371995f2a49a@bugseng.com> X-Sender: alessandro.zucchelli@bugseng.com Organization: BUGSENG Srl Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit 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 >> Signed-off-by: Jan Beulich > > Reviewed-by: Stefano Stabellini 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 >> +#include >> 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)