[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/4] xen/common: make {alloc,free}_domain_struct() static




On 12/18/25 7:21 PM, Andrew Cooper wrote:
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 <oleksii.kurochko@xxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Thanks.

---
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.

Then I will move both|free_domain_struct()| and|alloc_domain_struct()| (to keep 
them
together) to the place where the forward declaration of|free_domain_struct()| is
introduced in this patch.

Does that work for you?

~ Oleksii




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.