public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] KVM: x86: Replace IS_ERR() with IS_ERR_VALUE()
@ 2022-10-20 11:39 yexingchen116
  2022-10-20 17:37 ` Sean Christopherson
  2022-11-07 17:30 ` H. Peter Anvin
  0 siblings, 2 replies; 5+ messages in thread
From: yexingchen116 @ 2022-10-20 11:39 UTC (permalink / raw)
  To: seanjc
  Cc: pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa, kvm,
	linux-kernel, ye xingchen

From: ye xingchen <ye.xingchen@zte.com.cn>

Avoid type casts that are needed for IS_ERR() and use
IS_ERR_VALUE() instead.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 4bd5f8a751de..1c260f716c3b 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -12414,7 +12414,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa,
 		 */
 		hva = vm_mmap(NULL, 0, size, PROT_READ | PROT_WRITE,
 			      MAP_SHARED | MAP_ANONYMOUS, 0);
-		if (IS_ERR((void *)hva))
+		if (IS_ERR_VALUE(hva))
 			return (void __user *)hva;
 	} else {
 		if (!slot || !slot->npages)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH linux-next] KVM: x86: Replace IS_ERR() with IS_ERR_VALUE()
@ 2022-11-16  9:18 ye.xingchen
  2023-01-28  0:05 ` Sean Christopherson
  0 siblings, 1 reply; 5+ messages in thread
From: ye.xingchen @ 2022-11-16  9:18 UTC (permalink / raw)
  To: seanjc; +Cc: pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa, kvm,
	linux-kernel

From: ye xingchen <ye.xingchen@zte.com.cn>

Avoid type casts that are needed for IS_ERR() and use
IS_ERR_VALUE() instead.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index aa39e6c2d1f1..c2eaa9b8d2cb 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -12483,7 +12483,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa,
 		 */
 		hva = vm_mmap(NULL, 0, size, PROT_READ | PROT_WRITE,
 			      MAP_SHARED | MAP_ANONYMOUS, 0);
-		if (IS_ERR((void *)hva))
+		if (IS_ERR_VALUE(hva))
 			return (void __user *)hva;
 	} else {
 		if (!slot || !slot->npages)
-- 
2.25.1

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

end of thread, other threads:[~2023-01-28  0:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20 11:39 [PATCH linux-next] KVM: x86: Replace IS_ERR() with IS_ERR_VALUE() yexingchen116
2022-10-20 17:37 ` Sean Christopherson
2022-11-07 17:30 ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2022-11-16  9:18 ye.xingchen
2023-01-28  0:05 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox