From: Miaohe Lin <[email protected]>
We have no way to reach the final statement, remove it.
Signed-off-by: Miaohe Lin <[email protected]>
---
arch/x86/kvm/vmx/vmx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index e7ea332ad1e8..e58a0daf0f86 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -1781,8 +1781,6 @@ static int vmx_get_msr_feature(struct kvm_msr_entry *msr)
default:
return 1;
}
-
- return 0;
}
/*
--
2.19.1
On 05/12/19 03:24, linmiaohe wrote:
> From: Miaohe Lin <[email protected]>
>
> We have no way to reach the final statement, remove it.
> Signed-off-by: Miaohe Lin <[email protected]>
> ---
> arch/x86/kvm/vmx/vmx.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index e7ea332ad1e8..e58a0daf0f86 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -1781,8 +1781,6 @@ static int vmx_get_msr_feature(struct kvm_msr_entry *msr)
> default:
> return 1;
> }
> -
> - return 0;
> }
>
> /*
>
Queued, thanks.
Paolo
> On 5 Dec 2019, at 4:24, linmiaohe <[email protected]> wrote:
>
> From: Miaohe Lin <[email protected]>
>
> We have no way to reach the final statement, remove it.
> Signed-off-by: Miaohe Lin <[email protected]>
> ---
> arch/x86/kvm/vmx/vmx.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index e7ea332ad1e8..e58a0daf0f86 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -1781,8 +1781,6 @@ static int vmx_get_msr_feature(struct kvm_msr_entry *msr)
> default:
> return 1;
> }
> -
> - return 0;
> }
I personally just prefer to remove the “default” case and change this “return 0;” to “return 1;”.
But it’s a matter of taste of course.
>
>I personally just prefer to remove the “default” case and change this “return 0;” to “return 1;”.
>But it’s a matter of taste of course.
>
Yes. As what " Turnip greens, all have love " said. ^_^
On Fri, 6 Dec 2019 at 09:54, linmiaohe <[email protected]> wrote:
>
> >
> >I personally just prefer to remove the “default” case and change this “return 0;” to “return 1;”.
> >But it’s a matter of taste of course.
> >
> Yes. As what " Turnip greens, all have love " said. ^_^
Actually it is a great appreciated to introduce something more useful
instead of tons of cleanups, I saw guys did one cleanup and can incur
several bugs before.
Wanpeng
Wanpeng Li <[email protected]> wrote:
>>
>> >
>> >I personally just prefer to remove the “default” case and change this “return 0;” to “return 1;”.
>> >But it’s a matter of taste of course.
>> >
>> Yes. As what " Turnip greens, all have love " said. ^_^
>
>Actually it is a great appreciated to introduce something more useful instead of tons of cleanups, I saw guys did one cleanup and can incur several bugs before.
>
I'd like to introduce something more useful, but side corner cleanups may be hard to
found out something to introduce. And such cleanups can also be validated by code inspection
to avoid something bad. Many thanks.
On 06/12/19 04:41, linmiaohe wrote:
> Wanpeng Li <[email protected]> wrote:
>>>
>>>>
>>>> I personally just prefer to remove the “default” case and change this “return 0;” to “return 1;”.
>>>> But it’s a matter of taste of course.
>>>>
>>> Yes. As what " Turnip greens, all have love " said. ^_^
>>
>> Actually it is a great appreciated to introduce something more useful instead of tons of cleanups, I saw guys did one cleanup and can incur several bugs before.
>>
> I'd like to introduce something more useful, but side corner cleanups may be hard to
> found out something to introduce. And such cleanups can also be validated by code inspection
> to avoid something bad. Many thanks.
>
Yeah, I think you have been doing a good job. Usually, when the
cleanups introduce bugs there are many other "suspicious" things. For
me it's clear that you're learning the code and not just messing around.
Paolo
Paolo Bonzini <[email protected]> wrote:
>> Wanpeng Li <[email protected]> wrote:
>>>>
>>>>>
>>>>> I personally just prefer to remove the “default” case and change this “return 0;” to “return 1;”.
>>>>> But it’s a matter of taste of course.
>>>>>
>>>> Yes. As what " Turnip greens, all have love " said. ^_^
>>>
>>> Actually it is a great appreciated to introduce something more useful instead of tons of cleanups, I saw guys did one cleanup and can incur several bugs before.
>>>
>> I'd like to introduce something more useful, but side corner cleanups
>> may be hard to found out something to introduce. And such cleanups can
>> also be validated by code inspection to avoid something bad. Many thanks.
>>
>
>Yeah, I think you have been doing a good job. Usually, when the cleanups introduce bugs there are many other "suspicious" things. For me it's clear that you're learning the code and not just messing around.
>
>Paolo
Many thanks for your approve. I really feel grateful for it. In fact, I am investigating the
code and expect a deep understanding. But it's really a enormous, sophisticated and
wonderful world, what I can do now is try to keep the code clean. Maybe I could introduce some useful
features someday. Many thanks again.
Best wishes.