[PATCH for 8.0] exec/memory: Fix kernel-doc warning

Bernhard Beschow posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230315072552.47117-1-shentey@gmail.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
include/exec/memory.h | 2 +-
softmmu/memory.c      | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
[PATCH for 8.0] exec/memory: Fix kernel-doc warning
Posted by Bernhard Beschow 1 year, 1 month ago
During build the kernel-doc script complains about the following issue:

  src/docs/../include/exec/memory.h:1741: warning: Function parameter or member 'n' not described in 'memory_region_unmap_iommu_notifier_range'
  src/docs/../include/exec/memory.h:1741: warning: Excess function parameter 'notifier' description in 'memory_region_unmap_iommu_notifier_range'

Settle on "notifier" for consistency with other memory functions.

Fixes: 7caebbf9ea53
       ("memory: introduce memory_region_unmap_iommu_notifier_range()")
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 include/exec/memory.h | 2 +-
 softmmu/memory.c      | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/exec/memory.h b/include/exec/memory.h
index 6fa0b071f0..15ade918ba 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -1738,7 +1738,7 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
  *
  * @notifier: the notifier to be notified
  */
-void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n);
+void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier);
 
 
 /**
diff --git a/softmmu/memory.c b/softmmu/memory.c
index 4699ba55ec..5305aca7ca 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -1996,17 +1996,17 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
     }
 }
 
-void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n)
+void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier)
 {
     IOMMUTLBEvent event;
 
     event.type = IOMMU_NOTIFIER_UNMAP;
     event.entry.target_as = &address_space_memory;
-    event.entry.iova = n->start;
+    event.entry.iova = notifier->start;
     event.entry.perm = IOMMU_NONE;
-    event.entry.addr_mask = n->end - n->start;
+    event.entry.addr_mask = notifier->end - notifier->start;
 
-    memory_region_notify_iommu_one(n, &event);
+    memory_region_notify_iommu_one(notifier, &event);
 }
 
 void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
-- 
2.40.0
Re: [PATCH for 8.0] exec/memory: Fix kernel-doc warning
Posted by David Hildenbrand 1 year, 1 month ago
On 15.03.23 08:25, Bernhard Beschow wrote:
> During build the kernel-doc script complains about the following issue:
> 
>    src/docs/../include/exec/memory.h:1741: warning: Function parameter or member 'n' not described in 'memory_region_unmap_iommu_notifier_range'
>    src/docs/../include/exec/memory.h:1741: warning: Excess function parameter 'notifier' description in 'memory_region_unmap_iommu_notifier_range'
> 
> Settle on "notifier" for consistency with other memory functions.
> 
> Fixes: 7caebbf9ea53
>         ("memory: introduce memory_region_unmap_iommu_notifier_range()")
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb
Re: [PATCH for 8.0] exec/memory: Fix kernel-doc warning
Posted by Bernhard Beschow 1 year, 1 month ago
+ qemu-trivial

Am 15. März 2023 07:25:52 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>During build the kernel-doc script complains about the following issue:
>
>  src/docs/../include/exec/memory.h:1741: warning: Function parameter or member 'n' not described in 'memory_region_unmap_iommu_notifier_range'
>  src/docs/../include/exec/memory.h:1741: warning: Excess function parameter 'notifier' description in 'memory_region_unmap_iommu_notifier_range'
>
>Settle on "notifier" for consistency with other memory functions.
>
>Fixes: 7caebbf9ea53
>       ("memory: introduce memory_region_unmap_iommu_notifier_range()")
>Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>---
> include/exec/memory.h | 2 +-
> softmmu/memory.c      | 8 ++++----
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/include/exec/memory.h b/include/exec/memory.h
>index 6fa0b071f0..15ade918ba 100644
>--- a/include/exec/memory.h
>+++ b/include/exec/memory.h
>@@ -1738,7 +1738,7 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
>  *
>  * @notifier: the notifier to be notified
>  */
>-void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n);
>+void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier);
> 
> 
> /**
>diff --git a/softmmu/memory.c b/softmmu/memory.c
>index 4699ba55ec..5305aca7ca 100644
>--- a/softmmu/memory.c
>+++ b/softmmu/memory.c
>@@ -1996,17 +1996,17 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
>     }
> }
> 
>-void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n)
>+void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier)
> {
>     IOMMUTLBEvent event;
> 
>     event.type = IOMMU_NOTIFIER_UNMAP;
>     event.entry.target_as = &address_space_memory;
>-    event.entry.iova = n->start;
>+    event.entry.iova = notifier->start;
>     event.entry.perm = IOMMU_NONE;
>-    event.entry.addr_mask = n->end - n->start;
>+    event.entry.addr_mask = notifier->end - notifier->start;
> 
>-    memory_region_notify_iommu_one(n, &event);
>+    memory_region_notify_iommu_one(notifier, &event);
> }
> 
> void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
Re: [PATCH for 8.0] exec/memory: Fix kernel-doc warning
Posted by Laurent Vivier 1 year, 1 month ago
Le 15/03/2023 à 08:57, Bernhard Beschow a écrit :
> + qemu-trivial
> 
> Am 15. März 2023 07:25:52 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>> During build the kernel-doc script complains about the following issue:
>>
>>   src/docs/../include/exec/memory.h:1741: warning: Function parameter or member 'n' not described in 'memory_region_unmap_iommu_notifier_range'
>>   src/docs/../include/exec/memory.h:1741: warning: Excess function parameter 'notifier' description in 'memory_region_unmap_iommu_notifier_range'
>>
>> Settle on "notifier" for consistency with other memory functions.
>>
>> Fixes: 7caebbf9ea53
>>        ("memory: introduce memory_region_unmap_iommu_notifier_range()")
>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>> ---
>> include/exec/memory.h | 2 +-
>> softmmu/memory.c      | 8 ++++----
>> 2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/include/exec/memory.h b/include/exec/memory.h
>> index 6fa0b071f0..15ade918ba 100644
>> --- a/include/exec/memory.h
>> +++ b/include/exec/memory.h
>> @@ -1738,7 +1738,7 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
>>   *
>>   * @notifier: the notifier to be notified
>>   */
>> -void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n);
>> +void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier);
>>
>>
>> /**
>> diff --git a/softmmu/memory.c b/softmmu/memory.c
>> index 4699ba55ec..5305aca7ca 100644
>> --- a/softmmu/memory.c
>> +++ b/softmmu/memory.c
>> @@ -1996,17 +1996,17 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
>>      }
>> }
>>
>> -void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n)
>> +void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier)
>> {
>>      IOMMUTLBEvent event;
>>
>>      event.type = IOMMU_NOTIFIER_UNMAP;
>>      event.entry.target_as = &address_space_memory;
>> -    event.entry.iova = n->start;
>> +    event.entry.iova = notifier->start;
>>      event.entry.perm = IOMMU_NONE;
>> -    event.entry.addr_mask = n->end - n->start;
>> +    event.entry.addr_mask = notifier->end - notifier->start;
>>
>> -    memory_region_notify_iommu_one(n, &event);
>> +    memory_region_notify_iommu_one(notifier, &event);
>> }
>>
>> void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
> 

Applied to my trivial-patches branch.

Thanks,
Laurent


Re: [PATCH for 8.0] exec/memory: Fix kernel-doc warning
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
On 15/3/23 08:25, Bernhard Beschow wrote:
> During build the kernel-doc script complains about the following issue:
> 
>    src/docs/../include/exec/memory.h:1741: warning: Function parameter or member 'n' not described in 'memory_region_unmap_iommu_notifier_range'
>    src/docs/../include/exec/memory.h:1741: warning: Excess function parameter 'notifier' description in 'memory_region_unmap_iommu_notifier_range'
> 
> Settle on "notifier" for consistency with other memory functions.
> 
> Fixes: 7caebbf9ea53
>         ("memory: introduce memory_region_unmap_iommu_notifier_range()")
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
>   include/exec/memory.h | 2 +-
>   softmmu/memory.c      | 8 ++++----
>   2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index 6fa0b071f0..15ade918ba 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -1738,7 +1738,7 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
>    *
>    * @notifier: the notifier to be notified
>    */
> -void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n);
> +void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier);

This is ...:
https://lore.kernel.org/qemu-devel/20230310103123.2118519-11-alex.bennee@linaro.org/

>   /**
> diff --git a/softmmu/memory.c b/softmmu/memory.c
> index 4699ba55ec..5305aca7ca 100644
> --- a/softmmu/memory.c
> +++ b/softmmu/memory.c
> @@ -1996,17 +1996,17 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
>       }
>   }
>   
> -void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n)
> +void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier)
>   {
>       IOMMUTLBEvent event;
>   
>       event.type = IOMMU_NOTIFIER_UNMAP;
>       event.entry.target_as = &address_space_memory;
> -    event.entry.iova = n->start;
> +    event.entry.iova = notifier->start;
>       event.entry.perm = IOMMU_NONE;
> -    event.entry.addr_mask = n->end - n->start;
> +    event.entry.addr_mask = notifier->end - notifier->start;
>   
> -    memory_region_notify_iommu_one(n, &event);
> +    memory_region_notify_iommu_one(notifier, &event);
>   }

... but your patch matches the implementation with the declaration, so:

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Since you are looking at this, maybe you could also have a look at:
https://lore.kernel.org/qemu-devel/20230314114431.1096972-1-peter.maydell@linaro.org/