From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Hank Janssen <hjanssen@microsoft.com>
Subject: [PATCH 49/77] Staging: hv: vmbus: Cleanup error values in ringbuffer.c
Date: Thu, 16 Jun 2011 13:17:22 -0700 [thread overview]
Message-ID: <1308255470-3826-49-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1308255470-3826-1-git-send-email-kys@microsoft.com>
Use standard Linux errno values.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/blkvsc_drv.c | 2 +-
drivers/staging/hv/netvsc.c | 2 +-
drivers/staging/hv/ring_buffer.c | 6 +++---
drivers/staging/hv/storvsc_drv.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 1abe7f4..9898ea3 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -727,7 +727,7 @@ static int blkvsc_do_request(struct block_device_context *blkdev,
} else {
ret = blkvsc_submit_request(blkvsc_req,
blkvsc_request_completion);
- if (ret == -1) {
+ if (ret == -EAGAIN) {
pending = 1;
list_add_tail(&blkvsc_req->pend_entry,
&blkdev->pending_list);
diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c
index 944dcdc..c060b28 100644
--- a/drivers/staging/hv/netvsc.c
+++ b/drivers/staging/hv/netvsc.c
@@ -565,7 +565,7 @@ retry_send_cmplt:
if (ret == 0) {
/* success */
/* no-op */
- } else if (ret == -1) {
+ } else if (ret == -EAGAIN) {
/* no more room...wait a bit and attempt to retry 3 times */
retries++;
dev_err(&device->device, "unable to send receive completion pkt"
diff --git a/drivers/staging/hv/ring_buffer.c b/drivers/staging/hv/ring_buffer.c
index 42f7672..9212699 100644
--- a/drivers/staging/hv/ring_buffer.c
+++ b/drivers/staging/hv/ring_buffer.c
@@ -390,7 +390,7 @@ int hv_ringbuffer_write(struct hv_ring_buffer_info *outring_info,
/* is empty since the read index == write index */
if (bytes_avail_towrite <= totalbytes_towrite) {
spin_unlock_irqrestore(&outring_info->ring_lock, flags);
- return -1;
+ return -EAGAIN;
}
/* Write to the ring buffer */
@@ -450,7 +450,7 @@ int hv_ringbuffer_peek(struct hv_ring_buffer_info *Inring_info,
spin_unlock_irqrestore(&Inring_info->ring_lock, flags);
- return -1;
+ return -EAGAIN;
}
/* Convert to byte offset */
@@ -496,7 +496,7 @@ int hv_ringbuffer_read(struct hv_ring_buffer_info *inring_info, void *buffer,
if (bytes_avail_toread < buflen) {
spin_unlock_irqrestore(&inring_info->ring_lock, flags);
- return -1;
+ return -EAGAIN;
}
next_read_location =
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index c908fd8..1028689 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -580,7 +580,7 @@ retry_request:
/* Invokes the vsc to start an IO */
ret = storvsc_do_io(dev, &cmd_request->request);
- if (ret == -1) {
+ if (ret == -EAGAIN) {
/* no more space */
if (cmd_request->bounce_sgl_count) {
--
1.7.4.1
next prev parent reply other threads:[~2011-06-16 20:17 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 20:16 [PATCH 00/77] Staging: hv: Driver cleanup K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 01/77] Staging: hv: vmbus: Increase the timeout value in the vmbus driver K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 02/77] Staging: hv: netvsc: Increase the timeout value in the netvsc driver K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 03/77] Staging: hv: storvsc: Increase the timeout value in the storvsc driver K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 04/77] Staging: hv: netvsc: Fix a bug in accounting transmit slots K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 05/77] Staging: hv: vmbus: Properly handle the error in hv_acpi_init() K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 06/77] Staging: hv: vmbus: VMBUS is an ACPI enumerated device, get rid of the PCI signature K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 07/77] Staging: hv: vmbus: Introduce a function to map the dev_type guid to a name K. Y. Srinivasan
2011-07-05 16:01 ` Greg KH
2011-06-16 20:16 ` [PATCH 08/77] Staging: hv: vmbus: Introduce vmbus ID space in struct hv_driver K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 09/77] Staging: hv: blkvsc: Use the newly introduced vmbus ID in the blockvsc driver K. Y. Srinivasan
2011-07-05 16:04 ` Greg KH
2011-06-16 20:16 ` [PATCH 10/77] Staging: hv: storvsc: Use the newly introduced vmbus ID in storvsc driver K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 11/77] Staging: hv: netvsc: Use the newly introduced vmbus ID in netvsc driver K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 12/77] Staging: hv: mousevsc: Use the newly introduced vmbus ID in mouse driver K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 13/77] Staging: hv: vmbus: Introduce a human readable device type field to struct hv_device K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 14/77] Staging: hv: util: Make hv_utils a vmbus device driver K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 15/77] Staging: hv: blkvsc: Add the appropriate MODULE_ALIAS() line K. Y. Srinivasan
2011-07-05 16:06 ` Greg KH
2011-07-06 0:40 ` KY Srinivasan
2011-07-06 3:42 ` Greg KH
2011-07-06 14:55 ` KY Srinivasan
2011-07-06 15:02 ` Greg KH
2011-07-06 15:17 ` KY Srinivasan
2011-07-06 15:29 ` Greg KH
2011-07-06 15:47 ` KY Srinivasan
2011-06-16 20:16 ` [PATCH 16/77] Staging: hv: storvsc: " K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 17/77] Staging: hv: netvsc: " K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 18/77] Staging: hv: mousevsc: " K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 19/77] Staging: hv: util: " K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 20/77] Staging: hv: vmbus: Cleanup the vmbus_uevent() code K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 21/77] Staging: hv: vmbus: Get rid of an unnecessary include line in vmbus_drv.c K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 22/77] Staging: hv: storvsc: Get rid of the DMI signature K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 23/77] Staging: hv: netvsc: Get rid of the PCI signature K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 24/77] Staging: hv: netvsc: Get rid of the DMI signature in netvsc_drv.c K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 25/77] Staging: hv: util: Get rid of the DMI signature in hv_util.c K. Y. Srinivasan
2011-06-16 20:16 ` [PATCH 26/77] Staging: hv: util: Get rid of the PCI " K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 27/77] Staging: hv: vmbus: Cleanup vmbus_match() function K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 28/77] Staging: hv: blkvsc: Get rid of the dev_type guid from blkvsc_drv.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 29/77] Staging: hv: storvsc: Get rid of the device type guid from storvsc_drv.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 30/77] Staging: hv: netvsc: Get rid of the dev_type guid from netvsc.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 31/77] Staging: hv: netvsc: Initialize the driver name directly K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 32/77] Staging: hv: netvsc: Get rid of the driver name initialization in netvsc.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 33/77] Staging: hv: netvsc: Get rid of the empty function netvsc_initialize() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 34/77] Staging: hv: vmbus: Get rid of the unused name field in struct hv_driver K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 35/77] Staging: hv: mouse: Get rid of the dev_type guid in hv_mouse.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 36/77] Staging: hv: vmbus: Cleanup the code displaying class_id K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 37/77] Staging: hv: vmbus: Do not initialize dev_type guid in vmbus_child_device_create() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 38/77] Staging: hv: vmbus: Get rid of the unused dev_type field in hv_device and hv_driver K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 39/77] Staging: hv: vmbus: Get rid of the device_id attribute K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 40/77] Staging: hv: vmbus: Get rid of some unnecessary comments K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 41/77] Staging: hv: vmbus: Cleanup unnecessary comments in hv.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 42/77] Staging: hv: vmbus: Cleanup error handling in hv_init() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 43/77] Staging: hv: vmbus: Get rid of unnecessay comments in connection.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 44/77] Staging: hv: vmbus: Get rid of the function dump_gpadl_body() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 45/77] Staging: hv: vmbus: Get rid of the function dump_gpadl_header() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 46/77] Staging: hv: vmbus: Rename openMsg to open_msg in channel.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 47/77] Staging: hv: vmbus: Get rid of unnecessary comments " K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 48/77] Staging: hv: vmbus: Change the variable name openInfo to open_info " K. Y. Srinivasan
2011-06-16 20:17 ` K. Y. Srinivasan [this message]
2011-06-16 20:17 ` [PATCH 50/77] Staging: hv: vmbus: Cleanup the error return value in vmbus_recvpacket_raw() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 51/77] Staging: hv: netvsc: Get rid of an unnecessary print statement in netvsc_probe() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 52/77] Staging: hv: vmbus: Retry vmbus_post_msg() before giving up K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 53/77] Staging: hv: storvsc: Cleanup error handling in storvsc_dev_add() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 54/77] Staging: hv: storvsc: Cleanup error handling in storvsc_channel_init() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 55/77] Staging: hv: storvsc: Cleanup error handling in storvsc_connect_to_vsp() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 56/77] Staging: hv: storvsc: Cleanup error handling in storvsc_do_io() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 57/77] Storage: hv: storvsc: Get rid of some unnecessary DPRINTs from storvsc.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 58/77] Staging: hv: storvsc: Fix/cleanup some dated comments in storvsc.c K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 59/77] Staging: hv: storvsc: Cleanup returned error code in storvsc_host_reset() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 60/77] Staging: hv: storvsc: Cleanup error code returned in storvsc_probe() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 61/77] Staging: hv: storvsc: Cleanup returned error code in storvsc_drv_init() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 62/77] Staging: hv: netvsc: Cleanup the returned error code in netvsc_probe() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 63/77] Staging: hv: netvsc: Cleanup error return codes in netvsc_destroy_recv_buf() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 64/77] Staging: hv: netvsc: Cleanup error return values in netvsc_init_recv_buf() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 65/77] Staging: hv: netvsc: Cleanup error returns in netvsc_connect_vsp() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 66/77] Staging: hv: netvsc: Cleanup error return values in netvsc_send() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 67/77] Staging: hv: netvsc: Cleanup error return codes in netvsc_device_add() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 68/77] Staging: hv: netvsc: Cleanup error codes in rndis_filter_receive() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 69/77] Staging: hv: netvsc: Cleanup error code in rndis_filter_query_device() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 70/77] Staging: hv: netvsc: Cleanup error return values in rndis_filter_set_packet_filter() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 71/77] Staging: hv: netvsc: Cleanup error returns in rndis_filter_init_device() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 72/77] Staging: hv: netvsc: Cleanup error code in rndis_filter_device_add() K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 73/77] Staging: hv: mouse: Change the jump label Cleanup to cleanup K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 74/77] Staging: hv: mouse: Get rid of the unused PCI signature K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 75/77] Staging: hv: mouse: Disable auto-loading of the mouse driver K. Y. Srinivasan
2011-07-05 15:57 ` Greg KH
2011-07-05 16:10 ` KY Srinivasan
2011-07-05 16:18 ` Greg KH
2011-06-16 20:17 ` [PATCH 76/77] Staging: hv: netvsc: Change the jump label Cleanup to cleanup K. Y. Srinivasan
2011-06-16 20:17 ` [PATCH 77/77] Staging: hv: netvsc: Change the jump lable Exit to exit K. Y. Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308255470-3826-49-git-send-email-kys@microsoft.com \
--to=kys@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=hjanssen@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).