All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM:VDSO: use PTR_ERR_OR_ZERO for vma check
@ 2015-11-24  6:56 Mutharaju, Prasanna (P.)
  2015-11-24 21:52 ` Nathan Lynch
  0 siblings, 1 reply; 3+ messages in thread
From: Mutharaju, Prasanna (P.) @ 2015-11-24  6:56 UTC (permalink / raw)
  To: linux-arm-kernel

From: Prasanna Karthik <mkarthi3@visteon.com>

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
---
 arch/arm/kernel/vdso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
index 54a5aea..994e971 100644
--- a/arch/arm/kernel/vdso.c
+++ b/arch/arm/kernel/vdso.c
@@ -224,7 +224,7 @@ static int install_vvar(struct mm_struct *mm, unsigned long addr)
 				       VM_READ | VM_MAYREAD,
 				       &vdso_data_mapping);
 
-	return IS_ERR(vma) ? PTR_ERR(vma) : 0;
+	return PTR_ERR_OR_ZERO(vma);
 }
 
 /* assumes mmap_sem is write-locked */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM:VDSO: use PTR_ERR_OR_ZERO for vma check
  2015-11-24  6:56 [PATCH] ARM:VDSO: use PTR_ERR_OR_ZERO for vma check Mutharaju, Prasanna (P.)
@ 2015-11-24 21:52 ` Nathan Lynch
  2015-12-08 16:35   ` Nathan Lynch
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Lynch @ 2015-11-24 21:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/24/2015 12:56 AM, Mutharaju, Prasanna (P.) wrote:
> From: Prasanna Karthik <mkarthi3@visteon.com>
> 
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
> ---
>  arch/arm/kernel/vdso.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
> index 54a5aea..994e971 100644
> --- a/arch/arm/kernel/vdso.c
> +++ b/arch/arm/kernel/vdso.c
> @@ -224,7 +224,7 @@ static int install_vvar(struct mm_struct *mm, unsigned long addr)
>  				       VM_READ | VM_MAYREAD,
>  				       &vdso_data_mapping);
>  
> -	return IS_ERR(vma) ? PTR_ERR(vma) : 0;
> +	return PTR_ERR_OR_ZERO(vma);
>  }
>  

Thanks, I think this is fine, but I won't be able to properly process
this until next week.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM:VDSO: use PTR_ERR_OR_ZERO for vma check
  2015-11-24 21:52 ` Nathan Lynch
@ 2015-12-08 16:35   ` Nathan Lynch
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Lynch @ 2015-12-08 16:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/24/2015 03:52 PM, Nathan Lynch wrote:
> On 11/24/2015 12:56 AM, Mutharaju, Prasanna (P.) wrote:
>> From: Prasanna Karthik <mkarthi3@visteon.com>
>>
>> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>>
>> Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
>> ---
>>  arch/arm/kernel/vdso.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
>> index 54a5aea..994e971 100644
>> --- a/arch/arm/kernel/vdso.c
>> +++ b/arch/arm/kernel/vdso.c
>> @@ -224,7 +224,7 @@ static int install_vvar(struct mm_struct *mm, unsigned long addr)
>>  				       VM_READ | VM_MAYREAD,
>>  				       &vdso_data_mapping);
>>  
>> -	return IS_ERR(vma) ? PTR_ERR(vma) : 0;
>> +	return PTR_ERR_OR_ZERO(vma);
>>  }
>>  
> 
> Thanks, I think this is fine, but I won't be able to properly process
> this until next week.

I've verified that this results in no change in generated code, and I
have sent it to Russell to queue for 4.5, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-08 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-24  6:56 [PATCH] ARM:VDSO: use PTR_ERR_OR_ZERO for vma check Mutharaju, Prasanna (P.)
2015-11-24 21:52 ` Nathan Lynch
2015-12-08 16:35   ` Nathan Lynch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.