* device_def_domain_type documentation header does not match implementation
@ 2024-05-30 13:57 Diederik de Haas
2024-05-30 15:49 ` Robin Murphy
2024-05-31 1:17 ` Baolu Lu
0 siblings, 2 replies; 5+ messages in thread
From: Diederik de Haas @ 2024-05-30 13:57 UTC (permalink / raw)
To: David Woodhouse, Lu Baolu, Joerg Roedel, Will Deacon
Cc: Robin Murphy, iommu, linux-kernel, Diederik de Haas
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
Hi,
While looking into ``drivers/iommu/intel/iommu.c::device_def_domain_type``
function I noticed a discrepancy between the documentation header and the
implementation.
``@startup: true if this is during early boot``
0e31a7266508 ("iommu/vt-d: Remove startup parameter from
device_def_domain_type()")
removed the ``startup`` function parameter
returns ``IOMMU_DOMAIN_DMA: device requires a dynamic mapping domain``
28b41e2c6aeb ("iommu: Move def_domain type check for untrusted device into
core")
moved the possible return of ``IOMMU_DOMAIN_DMA`` to ``drivers/iommu/iommu.c``
But neither updated the documentation header.
Cheers,
Diederik
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: device_def_domain_type documentation header does not match implementation
2024-05-30 13:57 device_def_domain_type documentation header does not match implementation Diederik de Haas
@ 2024-05-30 15:49 ` Robin Murphy
2024-05-30 16:06 ` Diederik de Haas
2024-05-31 1:19 ` Baolu Lu
2024-05-31 1:17 ` Baolu Lu
1 sibling, 2 replies; 5+ messages in thread
From: Robin Murphy @ 2024-05-30 15:49 UTC (permalink / raw)
To: Diederik de Haas, David Woodhouse, Lu Baolu, Joerg Roedel,
Will Deacon
Cc: iommu, linux-kernel
On 30/05/2024 2:57 pm, Diederik de Haas wrote:
> Hi,
>
> While looking into ``drivers/iommu/intel/iommu.c::device_def_domain_type``
> function I noticed a discrepancy between the documentation header and the
> implementation.
>
> ``@startup: true if this is during early boot``
> 0e31a7266508 ("iommu/vt-d: Remove startup parameter from
> device_def_domain_type()")
> removed the ``startup`` function parameter
>
> returns ``IOMMU_DOMAIN_DMA: device requires a dynamic mapping domain``
> 28b41e2c6aeb ("iommu: Move def_domain type check for untrusted device into
> core")
> moved the possible return of ``IOMMU_DOMAIN_DMA`` to ``drivers/iommu/iommu.c``
>
> But neither updated the documentation header.
TBH it could probably just be deleted now, since the
iommu_ops::def_domain_type callback is properly documented in iommu.h,
so individual implementations shouldn't need to repeat that. It's also
never been actual kerneldoc either, since it's a regular "/*" comment.
Feel free to send a patch :)
Thanks,
Robin.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: device_def_domain_type documentation header does not match implementation
2024-05-30 15:49 ` Robin Murphy
@ 2024-05-30 16:06 ` Diederik de Haas
2024-05-31 1:19 ` Baolu Lu
1 sibling, 0 replies; 5+ messages in thread
From: Diederik de Haas @ 2024-05-30 16:06 UTC (permalink / raw)
To: David Woodhouse, Lu Baolu, Joerg Roedel, Will Deacon,
Robin Murphy
Cc: iommu, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
On Thursday, 30 May 2024 17:49:17 CEST Robin Murphy wrote:
> > But neither updated the documentation header.
>
> TBH it could probably just be deleted now, since the
> iommu_ops::def_domain_type callback is properly documented in iommu.h,
> so individual implementations shouldn't need to repeat that. It's also
> never been actual kerneldoc either, since it's a regular "/*" comment.
> Feel free to send a patch :)
I leave that to people who actually know what they're doing (I'm not a C dev).
Cheers,
Diederik
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: device_def_domain_type documentation header does not match implementation
2024-05-30 15:49 ` Robin Murphy
2024-05-30 16:06 ` Diederik de Haas
@ 2024-05-31 1:19 ` Baolu Lu
1 sibling, 0 replies; 5+ messages in thread
From: Baolu Lu @ 2024-05-31 1:19 UTC (permalink / raw)
To: Robin Murphy, Diederik de Haas, David Woodhouse, Joerg Roedel,
Will Deacon
Cc: baolu.lu, iommu, linux-kernel
On 5/30/24 11:49 PM, Robin Murphy wrote:
> On 30/05/2024 2:57 pm, Diederik de Haas wrote:
>> Hi,
>>
>> While looking into
>> ``drivers/iommu/intel/iommu.c::device_def_domain_type``
>> function I noticed a discrepancy between the documentation header and the
>> implementation.
>>
>> ``@startup: true if this is during early boot``
>> 0e31a7266508 ("iommu/vt-d: Remove startup parameter from
>> device_def_domain_type()")
>> removed the ``startup`` function parameter
>>
>> returns ``IOMMU_DOMAIN_DMA: device requires a dynamic mapping domain``
>> 28b41e2c6aeb ("iommu: Move def_domain type check for untrusted device
>> into
>> core")
>> moved the possible return of ``IOMMU_DOMAIN_DMA`` to
>> ``drivers/iommu/iommu.c``
>>
>> But neither updated the documentation header.
>
> TBH it could probably just be deleted now, since the
> iommu_ops::def_domain_type callback is properly documented in iommu.h,
> so individual implementations shouldn't need to repeat that. It's also
> never been actual kerneldoc either, since it's a regular "/*" comment.
> Feel free to send a patch 🙂
Agreed. I will make a patch to remove it later.
Best regards,
baolu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: device_def_domain_type documentation header does not match implementation
2024-05-30 13:57 device_def_domain_type documentation header does not match implementation Diederik de Haas
2024-05-30 15:49 ` Robin Murphy
@ 2024-05-31 1:17 ` Baolu Lu
1 sibling, 0 replies; 5+ messages in thread
From: Baolu Lu @ 2024-05-31 1:17 UTC (permalink / raw)
To: Diederik de Haas, David Woodhouse, Joerg Roedel, Will Deacon
Cc: baolu.lu, Robin Murphy, iommu, linux-kernel
On 5/30/24 9:57 PM, Diederik de Haas wrote:
> While looking into ``drivers/iommu/intel/iommu.c::device_def_domain_type``
> function I noticed a discrepancy between the documentation header and the
> implementation.
>
> ``@startup: true if this is during early boot``
> 0e31a7266508 ("iommu/vt-d: Remove startup parameter from
> device_def_domain_type()")
> removed the ``startup`` function parameter
>
> returns ``IOMMU_DOMAIN_DMA: device requires a dynamic mapping domain``
> 28b41e2c6aeb ("iommu: Move def_domain type check for untrusted device into
> core")
> moved the possible return of ``IOMMU_DOMAIN_DMA`` to ``drivers/iommu/iommu.c``
>
> But neither updated the documentation header.
Yeah, I think the @startup line should be removed. It is irrelevant.
Others remain good to me.
Best regards,
baolu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-31 1:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 13:57 device_def_domain_type documentation header does not match implementation Diederik de Haas
2024-05-30 15:49 ` Robin Murphy
2024-05-30 16:06 ` Diederik de Haas
2024-05-31 1:19 ` Baolu Lu
2024-05-31 1:17 ` Baolu Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox