On 11.03.2024 09:59, Simone Ballarin wrote:
> From: Maria Celeste Cesario <maria.celeste.cesa...@bugseng.com>
> 
> Add safe deviation for *.c files, as estabilished in past discussion.
> Add SAF deviation for files that need an #include directive before guard.

While similar topics, the two are technically entirely different, and
hence would likely again better be split. In fact I think I might ack
the former as is, while ...

> --- a/xen/include/public/arch-x86/xen.h
> +++ b/xen/include/public/arch-x86/xen.h
> @@ -7,6 +7,7 @@
>   * Copyright (c) 2004-2006, K A Fraser
>   */
>  
> +/* SAF-7-safe include before guard needed for correct code generation */
>  #include "../xen.h"
>  
>  #ifndef __XEN_PUBLIC_ARCH_X86_XEN_H__

... I fear I lack details about the need for this, not even taking into
account my earlier remark regarding the insertion of such comments in
public headers. Why is the #include needed for our own purposes (we
can't easily (re)move it entirely, as external consumers may rely on
it)? The common case is for this header to be included from ../xen.h.
In that case, aiui, the #include above has no effect at all, due to the
guard in ../xen.h. Which leaves direct inclusions of the header here.
There I'd expect a change like the one here to be accompanied by
clarification of why those few cases can't be switched to including
public/xen.h instead. Because if that was possible, doing so would
allow us to get away here without any deviation.

Jan

Reply via email to