diff mbox series

[1/4] KVM: selftests: Add a missing apostrophe in comment to show ownership

Message ID 20220613161942.1586791-2-seanjc@google.com (mailing list archive)
State New, archived
Headers show
Series KVM: selftests: Fixups for overhaul | expand

Commit Message

Sean Christopherson June 13, 2022, 4:19 p.m. UTC
Add an apostrophe in a comment about it being the caller's, not callers,
responsibility to free an object.

Reported-by: Andrew Jones <drjones@redhat.com>
Fixes: 768e9a61856b ("KVM: selftests: Purge vm+vcpu_id == vcpu silliness")
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jim Mattson June 13, 2022, 7:13 p.m. UTC | #1
On Mon, Jun 13, 2022 at 12:01 PM Sean Christopherson <seanjc@google.com> wrote:
>
> Add an apostrophe in a comment about it being the caller's, not callers,
> responsibility to free an object.
>
> Reported-by: Andrew Jones <drjones@redhat.com>
> Fixes: 768e9a61856b ("KVM: selftests: Purge vm+vcpu_id == vcpu silliness")
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>  tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
> index 39f2f5f1338f..0c550fb0dab2 100644
> --- a/tools/testing/selftests/kvm/lib/kvm_util.c
> +++ b/tools/testing/selftests/kvm/lib/kvm_util.c
> @@ -1434,7 +1434,7 @@ void vcpu_run_complete_io(struct kvm_vcpu *vcpu)
>  /*
>   * Get the list of guest registers which are supported for
>   * KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls.  Returns a kvm_reg_list pointer,
> - * it is the callers responsibility to free the list.
> + * it is the caller's responsibility to free the list.
>   */
Shouldn't that be callers'? Or are you assuming there is only ever
going to be one caller?
Sean Christopherson June 13, 2022, 7:32 p.m. UTC | #2
On Mon, Jun 13, 2022, Jim Mattson wrote:
> On Mon, Jun 13, 2022 at 12:01 PM Sean Christopherson <seanjc@google.com> wrote:
> >
> > Add an apostrophe in a comment about it being the caller's, not callers,
> > responsibility to free an object.
> >
> > Reported-by: Andrew Jones <drjones@redhat.com>
> > Fixes: 768e9a61856b ("KVM: selftests: Purge vm+vcpu_id == vcpu silliness")
> > Signed-off-by: Sean Christopherson <seanjc@google.com>
> > ---
> >  tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
> > index 39f2f5f1338f..0c550fb0dab2 100644
> > --- a/tools/testing/selftests/kvm/lib/kvm_util.c
> > +++ b/tools/testing/selftests/kvm/lib/kvm_util.c
> > @@ -1434,7 +1434,7 @@ void vcpu_run_complete_io(struct kvm_vcpu *vcpu)
> >  /*
> >   * Get the list of guest registers which are supported for
> >   * KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls.  Returns a kvm_reg_list pointer,
> > - * it is the callers responsibility to free the list.
> > + * it is the caller's responsibility to free the list.
> >   */
> Shouldn't that be callers'? Or are you assuming there is only ever
> going to be one caller?

No?  Regardless of the number of users of the function, for any given invocation
and allocation, there is exactly one caller.
Jim Mattson June 13, 2022, 7:35 p.m. UTC | #3
On Mon, Jun 13, 2022 at 12:32 PM Sean Christopherson <seanjc@google.com> wrote:
>
> On Mon, Jun 13, 2022, Jim Mattson wrote:
> > On Mon, Jun 13, 2022 at 12:01 PM Sean Christopherson <seanjc@google.com> wrote:
> > >
> > > Add an apostrophe in a comment about it being the caller's, not callers,
> > > responsibility to free an object.
> > >
> > > Reported-by: Andrew Jones <drjones@redhat.com>
> > > Fixes: 768e9a61856b ("KVM: selftests: Purge vm+vcpu_id == vcpu silliness")
> > > Signed-off-by: Sean Christopherson <seanjc@google.com>
> > > ---
> > >  tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
> > > index 39f2f5f1338f..0c550fb0dab2 100644
> > > --- a/tools/testing/selftests/kvm/lib/kvm_util.c
> > > +++ b/tools/testing/selftests/kvm/lib/kvm_util.c
> > > @@ -1434,7 +1434,7 @@ void vcpu_run_complete_io(struct kvm_vcpu *vcpu)
> > >  /*
> > >   * Get the list of guest registers which are supported for
> > >   * KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls.  Returns a kvm_reg_list pointer,
> > > - * it is the callers responsibility to free the list.
> > > + * it is the caller's responsibility to free the list.
> > >   */
> > Shouldn't that be callers'? Or are you assuming there is only ever
> > going to be one caller?
>
> No?  Regardless of the number of users of the function, for any given invocation
> and allocation, there is exactly one caller.

Statically, there may be multiple callers, and each is responsible for
freeing the list, right?
diff mbox series

Patch

diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
index 39f2f5f1338f..0c550fb0dab2 100644
--- a/tools/testing/selftests/kvm/lib/kvm_util.c
+++ b/tools/testing/selftests/kvm/lib/kvm_util.c
@@ -1434,7 +1434,7 @@  void vcpu_run_complete_io(struct kvm_vcpu *vcpu)
 /*
  * Get the list of guest registers which are supported for
  * KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls.  Returns a kvm_reg_list pointer,
- * it is the callers responsibility to free the list.
+ * it is the caller's responsibility to free the list.
  */
 struct kvm_reg_list *vcpu_get_reg_list(struct kvm_vcpu *vcpu)
 {