[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tools/libxl: Remove page_size and page_shift from struct libxl_acpi_ctxt
- To: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 24 Sep 2021 13:37:55 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=x2sBTeOOjlsr88v/K89sm3OS2YnDx3P3vKYIUokmi48=; b=ajS+qonkuLHlE5bK93nQ0K3Kv6JB/npJoujYIhQBKz5nnJ8e9Zsv2Y+r31f1L+p3IGzXcLlP1D+6jxYdg84XF2LOdy/1vlQHsmz23i/9Ks6JrIWZQ363Xr97zcLqrQXbKMHChzJj1DeEIEg8M0bTepMRcwxYGzpOHEthDxWZ652LughN3cCcpps6OKU3UjopVi5XaMgK0uSSD/scICBYnXou0sXheKnq8YhQIt2qasw6nnf9fEpNgMrycSY6jMt7XBqBztxh13TpxiNs26gseUivu92HkiqrXGxSTzga86kmsaoWgaZZUhDMUBoKMoVjzTYmhGZ379R+3GTGD9f5bA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SqwJ0VsO+PwTff6owfUfDq9QyRBJrcmRMIzH3SCgOOxBOqiPNz8khhmsLkxi7y5txZL5xcRDj0e/fyu+8beYInWZfzg8+zuCNj0w2zsUa32mIlpYyv/Faz6OkR6HWjYI6mqvEOl6LEqZTGYQs1xKMWYW8vuQZSVAxfD1DOWr1Jj6AhtsqpsHOljgBMZ7MWn4mzHLHrCdUzHyUD3VMf790CjpUioYSZS2Gno7CiF/asI9q6Ov5crbclQI+flvTnYdpr0qiAKVhMLx/wy4aLJgroRM+k7pBrNMYK4PW59ifHFzlL3LCzrmss4mGVgoptOU+yhGHdoc1W+gLGLXqSyFuA==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 24 Sep 2021 11:38:06 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 24.09.2021 13:05, Kevin Stefanov wrote:
> As a result of recent work, two members of struct libxl_acpi_ctxt were
> left with only one user. Thus, it becomes illogical for them to be
> members of the struct at all.
>
> Drop the two struct members and instead let the only function using
> them have them as local variables.
>
> Signed-off-by: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
I would like to suggest though to consider ...
> @@ -176,20 +174,19 @@ int libxl__dom_load_acpi(libxl__gc *gc,
> goto out;
> }
>
> - config.rsdp = (unsigned long)libxl__malloc(gc, libxl_ctxt.page_size);
> - config.infop = (unsigned long)libxl__malloc(gc, libxl_ctxt.page_size);
> + config.rsdp = (unsigned long)libxl__malloc(gc, page_size);
> + config.infop = (unsigned long)libxl__malloc(gc, page_size);
> /* Pages to hold ACPI tables */
> - libxl_ctxt.buf = libxl__malloc(gc, NUM_ACPI_PAGES *
> - libxl_ctxt.page_size);
> + libxl_ctxt.buf = libxl__malloc(gc, NUM_ACPI_PAGES * page_size);
... using page_shift to replace all multiplications like the one here
at this occasion.
Jan
|