diff mbox series

powerpc/kvm: fix repeated words in comments Delete the redundant word 'that'.

Message ID 20220724062920.1551-1-wangjianli@cdjrlc.com (mailing list archive)
State Changes Requested
Headers show
Series powerpc/kvm: fix repeated words in comments Delete the redundant word 'that'. | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 10 jobs.
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 10 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu fail kernel (mpc885_ads_defconfig, korg-5.5.0) failed at step build.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 7 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.

Commit Message

wangjianli July 24, 2022, 6:29 a.m. UTC
Signed-off-by: wangjianli <wangjianli@cdjrlc.com>
---
 arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Ellerman July 25, 2022, 6:51 a.m. UTC | #1
wangjianli <wangjianli@cdjrlc.com> writes:
> Signed-off-by: wangjianli <wangjianli@cdjrlc.com>
> ---
>  arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> index 514fd45c1994..73c6db20cd8a 100644
> --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
> +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> @@ -1601,7 +1601,7 @@ long kvm_vm_ioctl_resize_hpt_commit(struct kvm *kvm,
>   * is valid, it is written to the HPT as if an H_ENTER with the
>   * exact flag set was done.  When the invalid count is non-zero
>   * in the header written to the stream, the kernel will make
> - * sure that that many HPTEs are invalid, and invalidate them
> + * sure that many HPTEs are invalid, and invalidate them
>   * if not.

The existing wording is correct:

 "the kernel will make sure that ... that many HPTEs are invalid"

cheers
Julia Lawall July 25, 2022, 7:14 a.m. UTC | #2
On Mon, 25 Jul 2022, Michael Ellerman wrote:

> wangjianli <wangjianli@cdjrlc.com> writes:
> > Signed-off-by: wangjianli <wangjianli@cdjrlc.com>
> > ---
> >  arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> > index 514fd45c1994..73c6db20cd8a 100644
> > --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
> > +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> > @@ -1601,7 +1601,7 @@ long kvm_vm_ioctl_resize_hpt_commit(struct kvm *kvm,
> >   * is valid, it is written to the HPT as if an H_ENTER with the
> >   * exact flag set was done.  When the invalid count is non-zero
> >   * in the header written to the stream, the kernel will make
> > - * sure that that many HPTEs are invalid, and invalidate them
> > + * sure that many HPTEs are invalid, and invalidate them
> >   * if not.
>
> The existing wording is correct:
>
>  "the kernel will make sure that ... that many HPTEs are invalid"

Maybe it would be better as "that the number of invalid HPTEs is the same
as the invalid count"?

julia
Michael Ellerman July 25, 2022, 10:35 a.m. UTC | #3
Julia Lawall <julia.lawall@inria.fr> writes:
> On Mon, 25 Jul 2022, Michael Ellerman wrote:
>> wangjianli <wangjianli@cdjrlc.com> writes:
>> > diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
>> > index 514fd45c1994..73c6db20cd8a 100644
>> > --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
>> > +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
>> > @@ -1601,7 +1601,7 @@ long kvm_vm_ioctl_resize_hpt_commit(struct kvm *kvm,
>> >   * is valid, it is written to the HPT as if an H_ENTER with the
>> >   * exact flag set was done.  When the invalid count is non-zero
>> >   * in the header written to the stream, the kernel will make
>> > - * sure that that many HPTEs are invalid, and invalidate them
>> > + * sure that many HPTEs are invalid, and invalidate them
>> >   * if not.
>>
>> The existing wording is correct:
>>
>>  "the kernel will make sure that ... that many HPTEs are invalid"
>
> Maybe it would be better as "that the number of invalid HPTEs is the same
> as the invalid count"?

That doesn't read quite right, I think because if the number of invalid
HPTEs doesn't match the invalid count, the code will invalidate HPTEs so
that the number matches.

So maybe:

  When the invalid count is non-zero in the header written to the stream,
  the kernel will make sure that number of HPTEs are invalid, or
  invalidate them if not.

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 514fd45c1994..73c6db20cd8a 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -1601,7 +1601,7 @@  long kvm_vm_ioctl_resize_hpt_commit(struct kvm *kvm,
  * is valid, it is written to the HPT as if an H_ENTER with the
  * exact flag set was done.  When the invalid count is non-zero
  * in the header written to the stream, the kernel will make
- * sure that that many HPTEs are invalid, and invalidate them
+ * sure that many HPTEs are invalid, and invalidate them
  * if not.
  */