hv: fix return type of hv_post_message()
Subsystems (2)
PATCH 1/1 hv: fix return type of hv_post_message()
This function returns negative error codes, but because the type is u16 they get truncated into positive numbers. It doesn't look like the callers care, but we should fix it anyway as a cleanup.
Signed-off-by Dan Carpenter <[email protected]>
drivers/hv/hyperv_vmbus.h +1 -1
@@ -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);
drivers/hv/hv.c +1 -1
@@ -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) {
Quoted 10 lines
-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Wednesday, March 28, 2012 2:58 AM
To: KY Srinivasan
Cc: Haiyang Zhang; [email protected]; kernel- [email protected]
Subject: [patch] hv: fix return type ofhv_post_message()
Quoted 5 lines
This function returns negative error codes, but because the type is u16 they get truncated into positive numbers. It doesn't look like the callers care, but we should fix it anyway as a cleanup.
Signed-off-by Dan Carpenter <[email protected]>
Thanks Dan.
Signed-off-by K. Y. Srinivasan <[email protected]>
Quoted 27 lines
drivers/hv/hyperv_vmbus.h +1
-1@@ -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);drivers/hv/hv.c +1
-1@@ -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) {