On 26/03/2025 15:47, Anthony PERARD wrote:
>
>
> 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
Oh, I should have checked with tools/libs/light/CODING_STYLE.
> that can be fixed on commit:
> Reviewed-by: Anthony PERARD <anthony.per...@vates.tech>
Fixing on commit would be great.
~Michal