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

Re: [PATCH] xen/arm: domain_build: Propagate return code of map_irq_to_domain()


  • To: Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 11 May 2023 14:12:53 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YQ1q4ALsP4QhZ4g2KjzF7NfmUjBeIDLYWFcMqLRaQWs=; b=Ez6+cr6Bcy2lpwwNfHpB79RWnaov+lzbKVa9uKSyg/i4Sq9RMFGmL1r8gac+KDBlrUd5+e3I4v3mrE6uathq8U07VbcwsZ5ScwV+FiA0Hj2IhP5nLiFev1ES7aISIqB8qrTnaP1gHZOZLbf7/IqTioun3h558xC+VAN1hYpWCbyGKzXfEuLzKDo126xpjT/2v/FzYus8PPGYmpn8KhoFbf6wyIucqNpXWu1+aFhbxh2Ctg1Pk9qt/gkO5YItXRpRy2NpryO5mbWUemWyhssUzUJcWvuoIp80sHOuz/5nKeElj9DxZ12besdABpqzpIADSnrv55G19ILitOWFC70Cag==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gfRj3jvK8jfiKVw+rp9F0v6zMmirsDRwJh9HkcL0LFAilKKZVXYDEq+lx9VQkskatQEs7cDLfYRfAYmoy9l5M/CSiym1L+5F+h635OzkH0nBPxI11SdInPi1w94VSRwn577ki3Gt5B/pAV+fc+m2bIFMAzqN9DRQt/id4aXT2i6mk8OCfK1PRkuA+DRiA/fm2haCRLfL2U+bWuAfM8P12L2sukfVZRruVr4+wu5cZR6XxBFqwnbBhr1dE4u0NF4U9K6kXQpETXT1RiUBtr5gyFh0FrsaGlAMo37isLAAm4mJKi1SLsd/ncwufFJAMaqEeXSqred6GZQfgpjFClqs8w==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 11 May 2023 12:13:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 11/05/2023 13:55, Julien Grall wrote:
> 
> 
> Hi Michal,
> 
> On 11/05/2023 12:25, Michal Orzel wrote:
>>  From map_dt_irq_to_domain() we are assigning a return code of
>> map_irq_to_domain() to a variable without checking it for an error.
>> Fix it by propagating the return code directly since this is the last
>> call.
>>
>> Take the opportunity to use the correct printk() format specifiers,
>> since both irq and domain id are of unsigned types.
> 
> I would rather prefer if this is split in a separate patch because while
> we want to backport the first part, I don't think the latter wants to be.
Sure. I will then fix specifiers in both map_dt_irq_to_domain and 
map_irq_to_domain.

> 
>>
>> Fixes: 467e5cbb2ffc ("xen: arm: consolidate mmio and irq mapping to dom0")
>> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
>> ---
>>   xen/arch/arm/domain_build.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>> index f80fdd1af206..2c14718bff87 100644
>> --- a/xen/arch/arm/domain_build.c
>> +++ b/xen/arch/arm/domain_build.c
>> @@ -2303,7 +2303,7 @@ static int __init map_dt_irq_to_domain(const struct 
>> dt_device_node *dev,
>>
>>       if ( irq < NR_LOCAL_IRQS )
>>       {
>> -        printk(XENLOG_ERR "%s: IRQ%"PRId32" is not a SPI\n",
>> +        printk(XENLOG_ERR "%s: IRQ%u is not a SPI\n",
>>                  dt_node_name(dev), irq);
>>           return -EINVAL;
>>       }
>> @@ -2313,14 +2313,14 @@ static int __init map_dt_irq_to_domain(const struct 
>> dt_device_node *dev,
>>       if ( res )
>>       {
>>           printk(XENLOG_ERR
>> -               "%s: Unable to setup IRQ%"PRId32" to dom%d\n",
>> +               "%s: Unable to setup IRQ%u to dom%u\n",
>>                  dt_node_name(dev), irq, d->domain_id);
> 
> Please switch %pd when printing the domain.
ok

~Michal



 


Rackspace

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