Re: [PATCH v2] x86/sgx: Remove redundant if conditions in sgx_encl_create

2021-01-23 Thread Tianjia Zhang
On 1/21/21 1:47 AM, Sean Christopherson wrote: On Wed, Jan 20, 2021, Tianjia Zhang wrote: In this scenario, there is no case where va_page is NULL, and the error has been checked. The if condition statement here is redundant, so remove the condition detection. Reported-by: Jia Zhang Suggest

Re: [PATCH v2] x86/sgx: Remove redundant if conditions in sgx_encl_create

2021-01-20 Thread Jarkko Sakkinen
On Wed, Jan 20, 2021 at 09:47:53AM -0800, Sean Christopherson wrote: > On Wed, Jan 20, 2021, Tianjia Zhang wrote: > > In this scenario, there is no case where va_page is NULL, and > > the error has been checked. The if condition statement here is > > redundant, so remove the condition detection. >

Re: [PATCH v2] x86/sgx: Remove redundant if conditions in sgx_encl_create

2021-01-20 Thread Sean Christopherson
On Wed, Jan 20, 2021, Tianjia Zhang wrote: > In this scenario, there is no case where va_page is NULL, and > the error has been checked. The if condition statement here is > redundant, so remove the condition detection. > > Reported-by: Jia Zhang > Suggested-by: Sean Christopherson > Signed-off-

[PATCH v2] x86/sgx: Remove redundant if conditions in sgx_encl_create

2021-01-19 Thread Tianjia Zhang
In this scenario, there is no case where va_page is NULL, and the error has been checked. The if condition statement here is redundant, so remove the condition detection. Reported-by: Jia Zhang Suggested-by: Sean Christopherson Signed-off-by: Tianjia Zhang --- arch/x86/kernel/cpu/sgx/ioctl.c |