All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing
@ 2015-08-07 15:54 ` Nicholas Krause
  0 siblings, 0 replies; 8+ messages in thread
From: Nicholas Krause @ 2015-08-07 15:54 UTC (permalink / raw)
  To: gleb; +Cc: pbonzini, agraf, kvm, kvm-ppc, linuxppc-dev, linux-kernel

This fixes the incorrect return statement in the function
mpic_set_default_irq_routing from always returning zero
to signal success to this function's caller to instead
return the return value of kvm_set_irq_routing as this
function can fail and we need to correctly signal the
caller of mpic_set_default_irq_routing when the call
to this particular function has failed.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 arch/powerpc/kvm/mpic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kvm/mpic.c b/arch/powerpc/kvm/mpic.c
index 6249cdc..b14b85a 100644
--- a/arch/powerpc/kvm/mpic.c
+++ b/arch/powerpc/kvm/mpic.c
@@ -1641,16 +1641,17 @@ static void mpic_destroy(struct kvm_device *dev)
 static int mpic_set_default_irq_routing(struct openpic *opp)
 {
 	struct kvm_irq_routing_entry *routing;
+	int ret;
 
 	/* Create a nop default map, so that dereferencing it still works */
 	routing = kzalloc((sizeof(*routing)), GFP_KERNEL);
 	if (!routing)
 		return -ENOMEM;
 
-	kvm_set_irq_routing(opp->kvm, routing, 0, 0);
+	ret = kvm_set_irq_routing(opp->kvm, routing, 0, 0);
 
 	kfree(routing);
-	return 0;
+	return ret;
 }
 
 static int mpic_create(struct kvm_device *dev, u32 type)
-- 
2.1.4

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

* [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing
@ 2015-08-07 15:54 ` Nicholas Krause
  0 siblings, 0 replies; 8+ messages in thread
From: Nicholas Krause @ 2015-08-07 15:54 UTC (permalink / raw)
  To: gleb; +Cc: kvm, linux-kernel, kvm-ppc, pbonzini, linuxppc-dev, agraf

This fixes the incorrect return statement in the function
mpic_set_default_irq_routing from always returning zero
to signal success to this function's caller to instead
return the return value of kvm_set_irq_routing as this
function can fail and we need to correctly signal the
caller of mpic_set_default_irq_routing when the call
to this particular function has failed.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 arch/powerpc/kvm/mpic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kvm/mpic.c b/arch/powerpc/kvm/mpic.c
index 6249cdc..b14b85a 100644
--- a/arch/powerpc/kvm/mpic.c
+++ b/arch/powerpc/kvm/mpic.c
@@ -1641,16 +1641,17 @@ static void mpic_destroy(struct kvm_device *dev)
 static int mpic_set_default_irq_routing(struct openpic *opp)
 {
 	struct kvm_irq_routing_entry *routing;
+	int ret;
 
 	/* Create a nop default map, so that dereferencing it still works */
 	routing = kzalloc((sizeof(*routing)), GFP_KERNEL);
 	if (!routing)
 		return -ENOMEM;
 
-	kvm_set_irq_routing(opp->kvm, routing, 0, 0);
+	ret = kvm_set_irq_routing(opp->kvm, routing, 0, 0);
 
 	kfree(routing);
-	return 0;
+	return ret;
 }
 
 static int mpic_create(struct kvm_device *dev, u32 type)
-- 
2.1.4

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

* Re: [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing
  2015-08-07 15:54 ` Nicholas Krause
@ 2015-08-12 19:05   ` Alexander Graf
  -1 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2015-08-12 19:05 UTC (permalink / raw)
  To: Nicholas Krause, gleb; +Cc: linuxppc-dev, pbonzini, kvm, kvm-ppc, linux-kernel



On 07.08.15 17:54, Nicholas Krause wrote:
> This fixes the incorrect return statement in the function
> mpic_set_default_irq_routing from always returning zero
> to signal success to this function's caller to instead
> return the return value of kvm_set_irq_routing as this
> function can fail and we need to correctly signal the
> caller of mpic_set_default_irq_routing when the call
> to this particular function has failed.
> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>

I like the patch, but I don't see it on the kvm-ppc mailing list. It
doesn't show up on patchwork or spinics. Did something go wrong while
sending it out?


Alex

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

* Re: [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing
@ 2015-08-12 19:05   ` Alexander Graf
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2015-08-12 19:05 UTC (permalink / raw)
  To: Nicholas Krause, gleb; +Cc: linuxppc-dev, pbonzini, kvm, kvm-ppc, linux-kernel



On 07.08.15 17:54, Nicholas Krause wrote:
> This fixes the incorrect return statement in the function
> mpic_set_default_irq_routing from always returning zero
> to signal success to this function's caller to instead
> return the return value of kvm_set_irq_routing as this
> function can fail and we need to correctly signal the
> caller of mpic_set_default_irq_routing when the call
> to this particular function has failed.
> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>

I like the patch, but I don't see it on the kvm-ppc mailing list. It
doesn't show up on patchwork or spinics. Did something go wrong while
sending it out?


Alex

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

* Re: [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing
  2015-08-12 19:05   ` Alexander Graf
@ 2015-08-12 19:06     ` nick
  -1 siblings, 0 replies; 8+ messages in thread
From: nick @ 2015-08-12 19:06 UTC (permalink / raw)
  To: Alexander Graf, gleb; +Cc: linuxppc-dev, pbonzini, kvm, kvm-ppc, linux-kernel



On 2015-08-12 03:05 PM, Alexander Graf wrote:
> 
> 
> On 07.08.15 17:54, Nicholas Krause wrote:
>> This fixes the incorrect return statement in the function
>> mpic_set_default_irq_routing from always returning zero
>> to signal success to this function's caller to instead
>> return the return value of kvm_set_irq_routing as this
>> function can fail and we need to correctly signal the
>> caller of mpic_set_default_irq_routing when the call
>> to this particular function has failed.
>>
>> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> 
> I like the patch, but I don't see it on the kvm-ppc mailing list. It
> doesn't show up on patchwork or spinics. Did something go wrong while
> sending it out?
> 
> 
> Alex
> 
Alex,
Ask Paolo about it as he would be able to explain it better then I.
Nick

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

* Re: [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing
@ 2015-08-12 19:06     ` nick
  0 siblings, 0 replies; 8+ messages in thread
From: nick @ 2015-08-12 19:06 UTC (permalink / raw)
  To: Alexander Graf, gleb; +Cc: pbonzini, linuxppc-dev, kvm-ppc, kvm, linux-kernel



On 2015-08-12 03:05 PM, Alexander Graf wrote:
> 
> 
> On 07.08.15 17:54, Nicholas Krause wrote:
>> This fixes the incorrect return statement in the function
>> mpic_set_default_irq_routing from always returning zero
>> to signal success to this function's caller to instead
>> return the return value of kvm_set_irq_routing as this
>> function can fail and we need to correctly signal the
>> caller of mpic_set_default_irq_routing when the call
>> to this particular function has failed.
>>
>> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> 
> I like the patch, but I don't see it on the kvm-ppc mailing list. It
> doesn't show up on patchwork or spinics. Did something go wrong while
> sending it out?
> 
> 
> Alex
> 
Alex,
Ask Paolo about it as he would be able to explain it better then I.
Nick
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

* Re: [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing
  2015-08-12 19:06     ` nick
@ 2015-08-12 19:12       ` Alexander Graf
  -1 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2015-08-12 19:12 UTC (permalink / raw)
  To: nick, gleb; +Cc: linuxppc-dev, pbonzini, kvm, kvm-ppc, linux-kernel



On 12.08.15 21:06, nick wrote:
> 
> 
> On 2015-08-12 03:05 PM, Alexander Graf wrote:
>>
>>
>> On 07.08.15 17:54, Nicholas Krause wrote:
>>> This fixes the incorrect return statement in the function
>>> mpic_set_default_irq_routing from always returning zero
>>> to signal success to this function's caller to instead
>>> return the return value of kvm_set_irq_routing as this
>>> function can fail and we need to correctly signal the
>>> caller of mpic_set_default_irq_routing when the call
>>> to this particular function has failed.
>>>
>>> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
>>
>> I like the patch, but I don't see it on the kvm-ppc mailing list. It
>> doesn't show up on patchwork or spinics. Did something go wrong while
>> sending it out?
>>
>>
>> Alex
>>
> Alex,
> Ask Paolo about it as he would be able to explain it better then I.

Well, whatever the reason, I can only apply patches that actually
appeared on the public mailing list. Otherwise people may not get the
chance to review them ;).


Alex

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

* Re: [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing
@ 2015-08-12 19:12       ` Alexander Graf
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2015-08-12 19:12 UTC (permalink / raw)
  To: nick, gleb; +Cc: linuxppc-dev, pbonzini, kvm, kvm-ppc, linux-kernel



On 12.08.15 21:06, nick wrote:
> 
> 
> On 2015-08-12 03:05 PM, Alexander Graf wrote:
>>
>>
>> On 07.08.15 17:54, Nicholas Krause wrote:
>>> This fixes the incorrect return statement in the function
>>> mpic_set_default_irq_routing from always returning zero
>>> to signal success to this function's caller to instead
>>> return the return value of kvm_set_irq_routing as this
>>> function can fail and we need to correctly signal the
>>> caller of mpic_set_default_irq_routing when the call
>>> to this particular function has failed.
>>>
>>> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
>>
>> I like the patch, but I don't see it on the kvm-ppc mailing list. It
>> doesn't show up on patchwork or spinics. Did something go wrong while
>> sending it out?
>>
>>
>> Alex
>>
> Alex,
> Ask Paolo about it as he would be able to explain it better then I.

Well, whatever the reason, I can only apply patches that actually
appeared on the public mailing list. Otherwise people may not get the
chance to review them ;).


Alex

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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-07 15:54 [PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing Nicholas Krause
2015-08-07 15:54 ` Nicholas Krause
2015-08-12 19:05 ` Alexander Graf
2015-08-12 19:05   ` Alexander Graf
2015-08-12 19:06   ` nick
2015-08-12 19:06     ` nick
2015-08-12 19:12     ` Alexander Graf
2015-08-12 19:12       ` Alexander Graf

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.