On 18/12/2025 5:28 pm, Oleksii Kurochko wrote:
> As {alloc,free}_domain_struct() are used only within domain.c,
> they can be declared static and their declarations removed
> from xen/domain.h.
>
> Signed-off-by: Oleksii Kurochko <[email protected]>Acked-by: Andrew Cooper <[email protected]> > --- > Changes in v2: > - New patch. > --- > xen/common/domain.c | 6 ++++-- > xen/include/xen/domain.h | 4 ---- > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/xen/common/domain.c b/xen/common/domain.c > index 92fc0684fc..7509dafd6f 100644 > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -690,6 +690,8 @@ static int domain_teardown(struct domain *d) > return 0; > } > > +static void free_domain_struct(struct domain *d); > + Another option would be to move them both up here, and avoid the forward declaration. It's a bigger patch, but results in domain.c being slightly less complex. ~Andrew
