All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Stefano Stabellini <stefano.stabellini@amd.com>,
	xen-devel@lists.xenproject.org
Cc: michal.orzel@amd.com, jbeulich@suse.com, julien@xen.org,
	roger.pau@citrix.com, sstabellini@kernel.org,
	bertrand.marquis@arm.com,
	Federico Serafini <federico.serafini@bugseng.com>
Subject: Re: [PATCH 3/6] xen: add inclusion guards
Date: Sat, 17 May 2025 00:27:15 +0100	[thread overview]
Message-ID: <9b94e43e-3357-41c2-b982-26ed7ffb2fa5@citrix.com> (raw)
In-Reply-To: <20250516232130.835779-3-stefano.stabellini@amd.com>

On 17/05/2025 12:21 am, Stefano Stabellini wrote:
> From: Federico Serafini <federico.serafini@bugseng.com>
>
> MISRA C Directive 4.10 states that:
> "Precautions shall be taken in order to prevent the contents of a
> header file being included more than once".
>
> Add inclusion guards where missing to address violations of the
> guideline.
>
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> diff --git a/xen/common/decompress.h b/xen/common/decompress.h
> index 4683eb6c7e..034c833665 100644
> --- a/xen/common/decompress.h
> +++ b/xen/common/decompress.h
> @@ -1,3 +1,6 @@
> +#ifndef DECOMPRESS_H
> +#define DECOMPRESS_H
> +
>  #ifdef __XEN__
>  
>  #include <xen/decompress.h>
> @@ -22,3 +25,5 @@
>  #define large_free free
>  
>  #endif
> +
> +#endif /* DECOMPRESS_H */

This is borderline too generic, but a COMMON_ prefix doesn't make it any
better.  Oh well...

~Andrew

P.S. the decompressor infrastructure is several stacked disasters and
needs redoing from scratch.


  reply	other threads:[~2025-05-16 23:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16 23:21 [PATCH 0/6] MISRA D4.10: fix header guards Stefano Stabellini
2025-05-16 23:21 ` [PATCH 1/6] xen/arm: add inclusion guards Stefano Stabellini
2025-05-16 23:23   ` Andrew Cooper
2025-05-19 22:25   ` Julien Grall
2025-05-16 23:21 ` [PATCH 2/6] xen/x86: " Stefano Stabellini
2025-05-16 23:24   ` Andrew Cooper
2025-05-16 23:21 ` [PATCH 3/6] xen: " Stefano Stabellini
2025-05-16 23:27   ` Andrew Cooper [this message]
2025-05-16 23:21 ` [PATCH 4/6] xen: refactor include guards Stefano Stabellini
2025-05-16 23:29   ` Andrew Cooper
2025-05-17  0:10     ` [PATCH v2 " Stefano Stabellini
2025-05-17  0:13       ` Andrew Cooper
2025-05-16 23:21 ` [PATCH 5/6] x86/asm: refactor inclusion guards Stefano Stabellini
2025-05-17  0:10   ` Andrew Cooper
2025-05-16 23:21 ` [PATCH 6/6] automation/eclair: update configuration of D4.10 Stefano Stabellini
2025-05-16 23:57   ` Andrew Cooper
2025-05-19 14:13     ` Federico Serafini
2025-05-19 21:36       ` Stefano Stabellini
2025-05-23 15:49         ` Federico Serafini

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=9b94e43e-3357-41c2-b982-26ed7ffb2fa5@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=federico.serafini@bugseng.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@amd.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.