linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: fix doc warnings in mmu code
@ 2020-09-15 13:18 Xiaofei Tan
  2020-09-15 13:47 ` Marc Zyngier
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaofei Tan @ 2020-09-15 13:18 UTC (permalink / raw)
  To: maz, james.morse, julien.thierry.kdev, suzuki.poulose,
	catalin.marinas, will, linux-arm-kernel, kvmarm, linux-kernel
  Cc: Xiaofei Tan, linuxarm

Fix following warnings caused by mismatch bewteen function parameters
and comments.
arch/arm64/kvm/mmu.c:119: warning: Function parameter or member 'pudp'not described in 'stage2_dissolve_pud'
arch/arm64/kvm/mmu.c:119: warning: Excess function parameter 'pud' description in 'stage2_dissolve_pud'
arch/arm64/kvm/mmu.c:348: warning: Function parameter or member 'mmu' not described in '__unmap_stage2_range'
arch/arm64/kvm/mmu.c:348: warning: Function parameter or member 'may_block' not described in '__unmap_stage2_range'
arch/arm64/kvm/mmu.c:348: warning: Excess function parameter 'kvm' description in '__unmap_stage2_range'
arch/arm64/kvm/mmu.c:1474: warning: Function parameter or member 'writable' not described in 'kvm_phys_addr_ioremap'
arch/arm64/kvm/mmu.c:1536: warning: Function parameter or member 'mmu' not described in 'stage2_wp_pmds'
arch/arm64/kvm/mmu.c:1564: warning: Function parameter or member 'mmu' not described in 'stage2_wp_puds'
arch/arm64/kvm/mmu.c:1591: warning: Function parameter or member 'mmu' not described in 'stage2_wp_p4ds'
arch/arm64/kvm/mmu.c:1611: warning: Function parameter or member 'mmu' not described in 'stage2_wp_range'
arch/arm64/kvm/mmu.c:1611: warning: Excess function parameter 'kvm' description in 'stage2_wp_range'

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
---
 arch/arm64/kvm/mmu.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index ba00bcc..c76add7 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -111,7 +111,7 @@ static void stage2_dissolve_pmd(struct kvm_s2_mmu *mmu, phys_addr_t addr, pmd_t
  * stage2_dissolve_pud() - clear and flush huge PUD entry
  * @mmu:	pointer to mmu structure to operate on
  * @addr:	IPA
- * @pud:	pud pointer for IPA
+ * @pudp:	pud pointer for IPA
  *
  * Function clears a PUD entry, flushes addr 1st and 2nd stage TLBs.
  */
@@ -334,9 +334,10 @@ static void unmap_stage2_p4ds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
 
 /**
  * unmap_stage2_range -- Clear stage2 page table entries to unmap a range
- * @kvm:   The VM pointer
+ * @mmu:   pointer to mmu structure to operate on
  * @start: The intermediate physical base address of the range to unmap
  * @size:  The size of the area to unmap
+ * @may_block: The flag that if block is allowed here
  *
  * Clear a range of stage-2 mappings, lowering the various ref-counts.  Must
  * be called while holding mmu_lock (unless for freeing the stage2 pgd before
@@ -1468,6 +1469,7 @@ static int stage2_pudp_test_and_clear_young(pud_t *pud)
  * @guest_ipa:	The IPA at which to insert the mapping
  * @pa:		The physical address of the device
  * @size:	The size of the mapping
+ * @writable:   If it is writable here
  */
 int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa,
 			  phys_addr_t pa, unsigned long size, bool writable)
@@ -1526,7 +1528,7 @@ static void stage2_wp_ptes(pmd_t *pmd, phys_addr_t addr, phys_addr_t end)
 
 /**
  * stage2_wp_pmds - write protect PUD range
- * kvm:		kvm instance for the VM
+ * @mmu:        pointer to mmu structure to operate on
  * @pud:	pointer to pud entry
  * @addr:	range start address
  * @end:	range end address
@@ -1555,6 +1557,7 @@ static void stage2_wp_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
 
 /**
  * stage2_wp_puds - write protect P4D range
+ * @mmu:        pointer to mmu structure to operate on
  * @p4d:	pointer to p4d entry
  * @addr:	range start address
  * @end:	range end address
@@ -1582,6 +1585,7 @@ static void  stage2_wp_puds(struct kvm_s2_mmu *mmu, p4d_t *p4d,
 
 /**
  * stage2_wp_p4ds - write protect PGD range
+ * @mmu:        pointer to mmu structure to operate on
  * @pgd:	pointer to pgd entry
  * @addr:	range start address
  * @end:	range end address
@@ -1603,7 +1607,7 @@ static void  stage2_wp_p4ds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
 
 /**
  * stage2_wp_range() - write protect stage2 memory region range
- * @kvm:	The KVM pointer
+ * @mmu:        pointer to mmu structure to operate on
  * @addr:	Start address of range
  * @end:	End address of range
  */
-- 
2.8.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: arm64: fix doc warnings in mmu code
  2020-09-15 13:18 [PATCH] KVM: arm64: fix doc warnings in mmu code Xiaofei Tan
@ 2020-09-15 13:47 ` Marc Zyngier
  2020-09-16  1:51   ` Xiaofei Tan
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2020-09-15 13:47 UTC (permalink / raw)
  To: Xiaofei Tan
  Cc: suzuki.poulose, catalin.marinas, linux-kernel, linuxarm,
	james.morse, julien.thierry.kdev, will, kvmarm, linux-arm-kernel

Hi Xiaofei,

On 2020-09-15 14:18, Xiaofei Tan wrote:
> Fix following warnings caused by mismatch bewteen function parameters
> and comments.
> arch/arm64/kvm/mmu.c:119: warning: Function parameter or member
> 'pudp'not described in 'stage2_dissolve_pud'
> arch/arm64/kvm/mmu.c:119: warning: Excess function parameter 'pud'
> description in 'stage2_dissolve_pud'

[...]

Most of this code is being deleted. If you want to fix comments,
please look at what is in -next.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: arm64: fix doc warnings in mmu code
  2020-09-15 13:47 ` Marc Zyngier
@ 2020-09-16  1:51   ` Xiaofei Tan
  0 siblings, 0 replies; 3+ messages in thread
From: Xiaofei Tan @ 2020-09-16  1:51 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: suzuki.poulose, catalin.marinas, linux-kernel, linuxarm,
	james.morse, julien.thierry.kdev, will, kvmarm, linux-arm-kernel

Hi Marc,

OK, I will send v2 patch based on kvmarm-next branch. thanks.

On 2020/9/15 21:47, Marc Zyngier wrote:
> Hi Xiaofei,
> 
> On 2020-09-15 14:18, Xiaofei Tan wrote:
>> Fix following warnings caused by mismatch bewteen function parameters
>> and comments.
>> arch/arm64/kvm/mmu.c:119: warning: Function parameter or member
>> 'pudp'not described in 'stage2_dissolve_pud'
>> arch/arm64/kvm/mmu.c:119: warning: Excess function parameter 'pud'
>> description in 'stage2_dissolve_pud'
> 
> [...]
> 
> Most of this code is being deleted. If you want to fix comments,
> please look at what is in -next.
> 
> Thanks,
> 
>         M.

-- 
 thanks
tanxiaofei


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-16  1:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 13:18 [PATCH] KVM: arm64: fix doc warnings in mmu code Xiaofei Tan
2020-09-15 13:47 ` Marc Zyngier
2020-09-16  1:51   ` Xiaofei Tan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).