On 14/03/2025 10:15 am, Roger Pau Monné wrote:
> On Fri, Mar 14, 2025 at 09:55:23AM +0000, Andrew Cooper wrote:
>> Use %pd, and state what the unknown is.  As it's an enum, it's a signed type.
>>
>> Also drop one piece of trailing whitespace.
>>
>> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> Acked-by: Roger Pau Monné <roger....@citrix.com>

Thanks.

>
>> ---
>> CC: Jan Beulich <jbeul...@suse.com>
>> CC: Roger Pau Monné <roger....@citrix.com>
>> ---
>>  xen/drivers/passthrough/vtd/intremap.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/xen/drivers/passthrough/vtd/intremap.c 
>> b/xen/drivers/passthrough/vtd/intremap.c
>> index 81394ef45299..9272a2511398 100644
>> --- a/xen/drivers/passthrough/vtd/intremap.c
>> +++ b/xen/drivers/passthrough/vtd/intremap.c
>> @@ -485,15 +485,15 @@ static int set_msi_source_id(const struct pci_dev 
>> *pdev,
>>          else
>>          {
>>              dprintk(XENLOG_WARNING VTDPREFIX,
>> -                    "d%d: no upstream bridge for %pp\n",
>> -                    pdev->domain->domain_id, &pdev->sbdf);
>> +                    "%pd: no upstream bridge for %pp\n",
>> +                    pdev->domain, &pdev->sbdf);
>>              return -ENXIO;
>>          }
>>          break;
>>  
>>      default:
>> -        dprintk(XENLOG_WARNING VTDPREFIX, "d%d: unknown(%u): %pp\n",
>> -                pdev->domain->domain_id, pdev->type, &pdev->sbdf);
>> +        dprintk(XENLOG_WARNING VTDPREFIX, "%pd: %pp unknown device type 
>> %d\n",
>> +                pdev->domain, &pdev->sbdf, pdev->type);
> Would be nice to have a pdev_type_to_str() or similar helper.

In this case, I think we'd only get UNKNOWN out of it, based on what
else the switch() handles.

~Andrew

Reply via email to