On 10.02.25 12:46, Jan Beulich wrote:
> On 10.02.2025 11:30, Mykyta Poturai wrote:
>> --- a/xen/include/xen/iommu.h
>> +++ b/xen/include/xen/iommu.h
>> @@ -238,6 +238,14 @@ int iommu_do_dt_domctl(struct xen_domctl *domctl, 
>> struct domain *d,
>>    */
>>   int iommu_remove_dt_device(struct dt_device_node *np);
>>   
>> +/*
>> + * Status code indicating that DT device cannot be added to the IOMMU
>> + * or removed from it because the IOMMU is disabled or the device is not
>> + * connected to it.
>> + */
>> +
>> +#define DT_NO_IOMMU    1
> 
> While an improvement, it still isn't clear whose "status code" this is.
> The #define is effectively hanging in the air, from all I can tell. And
> from it not being a normal error code it is pretty clear that it better
> would have only very narrow use.
> 
> Also can you please omit an interspersing blank line when the comment
> is specifically tied to a definition or declaration?
> 
> Jan

Hi Jan

What would you say about removing this status code entirely and 
returning something like -ENODEV instead, with adding special handling 
for this return to the callers where needed?

-- 
Mykyta

Reply via email to