[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


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 18 Dec 2025 18:21:30 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4P6w5B9cN7T0jqCh86A/IzlgKRvUwpqmyy1Mp7l32nQ=; b=YQoqfpdj6IYxSxQWuLwkhewUHUONFInu4QIEcXRwucdbhO+UGI04KBjXFSZhZveuMx/wqppoU2lCeyEme/JCCUzZii3UvaWgbvWSn2uDg4pA3/0sOh3ksV+8nG+D3tVi0h1CPEjlte7u+n8nVx7EcHbQ0Q2bKsOa4yH0dE0LAQWNVB9mDdBxPOVeO5ZRlZuAmof6KreBx7xzsukvyU6Kfb5/FXwsNJwOJgZDWpK7kKax6B6XrLThDdFqShPofExAIwS3dsSiacLhHkxNAmNwQ7H3bKTRRovrMMa8HzxhLjlUaZ6FbgweS++HV/o62qnemhFWQzC3S8sFS8BYJXvwEA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Xmj50usCK579155BvuNi4ShxVOF2KpXl+e+2Am9dHrm2+BlKCjCHxNGayvmCNx3tamNcC/Ha5ccaf37Bbqa3iN8SHkppWF/nv2DY/tTk8qrIk4m7B+YJiHUV51pmWHjbXoLNdtvS2YYbEEDBzm11htOxRnCPY3VnfYsN5ItSZ6gCVl6cxLiHx1gg7olXMjs1VDv/bwNprE/BwQ1tB7gnYLGJVCM6JfN3JEKLjbtx6MxLiK89aJ0I+sOOdboUFp1rajp+A1Vzbn7DL2G/z45w32siEgzHrb2rFT4gNXptAf6uwkrUo9ea83P+Lz8aUxK2WDEPCcOvJMJkRjvoNlY5ow==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 18 Dec 2025 18:21:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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>

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



 


Rackspace

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