From: "Anthony PERARD" <anthony.perard@vates.tech>
To: "Michal Orzel" <michal.orzel@amd.com>
Cc: xen-devel@lists.xenproject.org, "Juergen Gross" <jgross@suse.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Julien Grall" <julien@xen.org>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Luca Fancellu" <luca.fancellu@arm.com>
Subject: Re: [PATCH v2] tools/arm: Fix nr_spis handling v2
Date: Wed, 26 Mar 2025 14:47:33 +0000 [thread overview]
Message-ID: <Z-QTg7pAam8jmVda@l14> (raw)
In-Reply-To: <20250325110029.399838-1-michal.orzel@amd.com>
On Tue, Mar 25, 2025 at 12:00:29PM +0100, Michal Orzel wrote:
> diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c
> index 2d895408cac3..0adcaa373b54 100644
> --- a/tools/libs/light/libxl_arm.c
> +++ b/tools/libs/light/libxl_arm.c
> @@ -181,13 +181,18 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
>
> LOG(DEBUG, "Configure the domain");
>
> - if (nr_spis > d_config->b_info.arch_arm.nr_spis) {
> - LOG(ERROR, "Provided nr_spis value is too small (minimum required %u)\n",
> - nr_spis);
> - return ERROR_FAIL;
> + /* Check if a user provided a value or not */
> + if (cfg_nr_spis != LIBXL_NR_SPIS_DEFAULT) {
> + if (nr_spis > cfg_nr_spis) {
> + LOG(ERROR, "Provided nr_spis value is too small (minimum required %u)\n",
> + nr_spis);
> + return ERROR_FAIL;
> + }
> + config->arch.nr_spis = cfg_nr_spis;
> }
> + else
> + config->arch.nr_spis = nr_spis;
Just one small coding style issue: to avoid confusion, whenever one side
a of an if..else is using a block, both side should use a block. But
that can be fixed on commit:
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2025-03-26 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 11:00 [PATCH v2] tools/arm: Fix nr_spis handling v2 Michal Orzel
2025-03-26 14:47 ` Anthony PERARD [this message]
2025-03-26 17:21 ` Orzel, Michal
2025-03-27 8:46 ` Bertrand Marquis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-QTg7pAam8jmVda@l14 \
--to=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=luca.fancellu@arm.com \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.