* [PATCH] Drivers: hv: Fix return type of hv_post_message().
@ 2012-03-30 11:50 santosh nayak
2012-03-30 11:53 ` Dan Carpenter
2012-03-30 12:20 ` Dan Carpenter
0 siblings, 2 replies; 3+ messages in thread
From: santosh nayak @ 2012-03-30 11:50 UTC (permalink / raw)
To: kernel-janitors
From: Santosh Nayak <santoshprasadnayak@gmail.com>
On failed memory allocation 'hv_post_message()' returns -ENOMEM.
As return type of this function is 'u16', -ENOMEM becomes 65524.
Change the return type from 'u16' to 'int'.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
drivers/hv/hv.c | 2 +-
drivers/hv/hyperv_vmbus.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 15956bd..86f8885 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -252,7 +252,7 @@ void hv_cleanup(void)
*
* This involves a hypercall.
*/
-u16 hv_post_message(union hv_connection_id connection_id,
+int hv_post_message(union hv_connection_id connection_id,
enum hv_message_type message_type,
void *payload, size_t payload_size)
{
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 699f0d8..b9426a6 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -495,7 +495,7 @@ extern int hv_init(void);
extern void hv_cleanup(void);
-extern u16 hv_post_message(union hv_connection_id connection_id,
+extern int hv_post_message(union hv_connection_id connection_id,
enum hv_message_type message_type,
void *payload, size_t payload_size);
--
1.7.4.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Drivers: hv: Fix return type of hv_post_message().
2012-03-30 11:50 [PATCH] Drivers: hv: Fix return type of hv_post_message() santosh nayak
@ 2012-03-30 11:53 ` Dan Carpenter
2012-03-30 12:20 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-03-30 11:53 UTC (permalink / raw)
To: kernel-janitors
On Fri, Mar 30, 2012 at 05:08:33PM +0530, santosh nayak wrote:
> From: Santosh Nayak <santoshprasadnayak@gmail.com>
>
> On failed memory allocation 'hv_post_message()' returns -ENOMEM.
> As return type of this function is 'u16', -ENOMEM becomes 65524.
> Change the return type from 'u16' to 'int'.
>
> Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Too late. :P I just fixed this one two days ago...
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Drivers: hv: Fix return type of hv_post_message().
2012-03-30 11:50 [PATCH] Drivers: hv: Fix return type of hv_post_message() santosh nayak
2012-03-30 11:53 ` Dan Carpenter
@ 2012-03-30 12:20 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-03-30 12:20 UTC (permalink / raw)
To: kernel-janitors
On Fri, Mar 30, 2012 at 02:53:13PM +0300, Dan Carpenter wrote:
> On Fri, Mar 30, 2012 at 05:08:33PM +0530, santosh nayak wrote:
> > From: Santosh Nayak <santoshprasadnayak@gmail.com>
> >
> > On failed memory allocation 'hv_post_message()' returns -ENOMEM.
> > As return type of this function is 'u16', -ENOMEM becomes 65524.
> > Change the return type from 'u16' to 'int'.
> >
> > Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
>
> Too late. :P I just fixed this one two days ago...
>
Btw, for a while a bunch of us were sending duplicate patches. So
that's why part of the reason why we CC kernel-janitors. Also I do
appreciate Walter's reviews as well.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-30 12:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 11:50 [PATCH] Drivers: hv: Fix return type of hv_post_message() santosh nayak
2012-03-30 11:53 ` Dan Carpenter
2012-03-30 12:20 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox