Patchwork [3/3] powerpc/kvm: remove redundant assignment

login
register
mail settings
Submitter Liu Ping Fan
Date Nov. 5, 2013, 7:42 a.m.
Message ID <1383637364-14691-3-git-send-email-pingfank@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/288401/
State New
Headers show

Comments

Liu Ping Fan - Nov. 5, 2013, 7:42 a.m.
Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 -
 1 file changed, 1 deletion(-)
Paul Mackerras - Nov. 6, 2013, 5:04 a.m.
On Tue, Nov 05, 2013 at 03:42:44PM +0800, Liu Ping Fan wrote:
> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> ---
>  arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> index 28160ac..7682837 100644
> --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
> +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> @@ -731,7 +731,6 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
>  	lock_rmap(rmap);
>  
>  	/* Check if we might have been invalidated; let the guest retry if so */
> -	ret = RESUME_GUEST;
>  	if (mmu_notifier_retry(vcpu->kvm, mmu_seq)) {
>  		unlock_rmap(rmap);
>  		goto out_unlock;

Acked-by: Paul Mackerras <paulus@samba.org>
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexander Graf - Nov. 6, 2013, 11:24 a.m.
On 05.11.2013, at 08:42, Liu Ping Fan <kernelfans@gmail.com> wrote:

> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>

Patch description missing.

Please add Paul's ack in the next revision of this patch :).


Alex

> ---
> arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> index 28160ac..7682837 100644
> --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
> +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> @@ -731,7 +731,6 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
> 	lock_rmap(rmap);
> 
> 	/* Check if we might have been invalidated; let the guest retry if so */
> -	ret = RESUME_GUEST;
> 	if (mmu_notifier_retry(vcpu->kvm, mmu_seq)) {
> 		unlock_rmap(rmap);
> 		goto out_unlock;
> -- 
> 1.8.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benjamin Herrenschmidt - Nov. 6, 2013, 7:58 p.m.
On Wed, 2013-11-06 at 12:24 +0100, Alexander Graf wrote:
> On 05.11.2013, at 08:42, Liu Ping Fan <kernelfans@gmail.com> wrote:
> 
> > Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> 
> Patch description missing.

Do you really need a description for trivial one-lines whose subject
is a perfectly complete description already ?

> Please add Paul's ack in the next revision of this patch :).
> 
> 
> Alex
> 
> > ---
> > arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 -
> > 1 file changed, 1 deletion(-)
> > 
> > diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> > index 28160ac..7682837 100644
> > --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
> > +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
> > @@ -731,7 +731,6 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
> > 	lock_rmap(rmap);
> > 
> > 	/* Check if we might have been invalidated; let the guest retry if so */
> > -	ret = RESUME_GUEST;
> > 	if (mmu_notifier_retry(vcpu->kvm, mmu_seq)) {
> > 		unlock_rmap(rmap);
> > 		goto out_unlock;
> > -- 
> > 1.8.1.4
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexander Graf - Nov. 7, 2013, 7:52 a.m.
Am 06.11.2013 um 20:58 schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:

> On Wed, 2013-11-06 at 12:24 +0100, Alexander Graf wrote:
>> On 05.11.2013, at 08:42, Liu Ping Fan <kernelfans@gmail.com> wrote:
>> 
>>> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
>> 
>> Patch description missing.
> 
> Do you really need a description for trivial one-lines whose subject
> is a perfectly complete description already ?

Would I ask for it otherwise? It's also not 100% obvious that the assignment is redundant.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benjamin Herrenschmidt - Nov. 7, 2013, 7:55 a.m.
On Thu, 2013-11-07 at 08:52 +0100, Alexander Graf wrote:
> Am 06.11.2013 um 20:58 schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:
> 
> > On Wed, 2013-11-06 at 12:24 +0100, Alexander Graf wrote:
> >> On 05.11.2013, at 08:42, Liu Ping Fan <kernelfans@gmail.com> wrote:
> >> 
> >>> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> >> 
> >> Patch description missing.
> > 
> > Do you really need a description for trivial one-lines whose subject
> > is a perfectly complete description already ?
> 
> Would I ask for it otherwise? It's also not 100% obvious that the assignment is redundant.

And ? An explanation isn't going to be clearer than the code in that
case ...

Ben.


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexander Graf - Nov. 7, 2013, 8:14 a.m.
Am 07.11.2013 um 08:55 schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:

> On Thu, 2013-11-07 at 08:52 +0100, Alexander Graf wrote:
>> Am 06.11.2013 um 20:58 schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:
>> 
>>> On Wed, 2013-11-06 at 12:24 +0100, Alexander Graf wrote:
>>>> On 05.11.2013, at 08:42, Liu Ping Fan <kernelfans@gmail.com> wrote:
>>>> 
>>>>> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
>>>> 
>>>> Patch description missing.
>>> 
>>> Do you really need a description for trivial one-lines whose subject
>>> is a perfectly complete description already ?
>> 
>> Would I ask for it otherwise? It's also not 100% obvious that the assignment is redundant.
> 
> And ? An explanation isn't going to be clearer than the code in that
> case ...

It's pretty non-obvious when you do a git show on that patch in 1 year from now, as the redundancy is out of scope of what the diff shows.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benjamin Herrenschmidt - Nov. 7, 2013, 8:36 a.m.
On Thu, 2013-11-07 at 09:14 +0100, Alexander Graf wrote:
> > And ? An explanation isn't going to be clearer than the code in that
> > case ...
> 
> It's pretty non-obvious when you do a git show on that patch in 1 year
> from now, as the redundancy is out of scope of what the diff shows.

And ? How would an explanation help ?

Either it's redundant or it's not ... but only look at the code can
prove it. An explanation won't because if the patch is wrong, so will be
the explanation.

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 28160ac..7682837 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -731,7 +731,6 @@  int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
 	lock_rmap(rmap);
 
 	/* Check if we might have been invalidated; let the guest retry if so */
-	ret = RESUME_GUEST;
 	if (mmu_notifier_retry(vcpu->kvm, mmu_seq)) {
 		unlock_rmap(rmap);
 		goto out_unlock;