Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347465
b: refs/heads/master
c: 589575a
h: refs/heads/master
i:
  347463: 40a0a01
v: v3
  • Loading branch information
Rusty Russell committed Dec 18, 2012
1 parent 4877e94 commit 03227a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98e8c6bc66048db6f921ccd5b24f0e09804cfcca
refs/heads/master: 589575a23562b588c82bdb57ed8c09bee5f0f174
10 changes: 5 additions & 5 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
vq = portdev->c_ovq;

sg_init_one(sg, &cpkt, sizeof(cpkt));
if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt, GFP_ATOMIC) >= 0) {
if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt, GFP_ATOMIC) == 0) {
virtqueue_kick(vq);
while (!virtqueue_get_buf(vq, &len))
cpu_relax();
Expand Down Expand Up @@ -526,7 +526,7 @@ static ssize_t __send_to_port(struct port *port, struct scatterlist *sg,
struct buffer_token *tok, bool nonblock)
{
struct virtqueue *out_vq;
ssize_t ret;
int err;
unsigned long flags;
unsigned int len;

Expand All @@ -536,17 +536,17 @@ static ssize_t __send_to_port(struct port *port, struct scatterlist *sg,

reclaim_consumed_buffers(port);

ret = virtqueue_add_buf(out_vq, sg, nents, 0, tok, GFP_ATOMIC);
err = virtqueue_add_buf(out_vq, sg, nents, 0, tok, GFP_ATOMIC);

/* Tell Host to go! */
virtqueue_kick(out_vq);

if (ret < 0) {
if (err) {
in_count = 0;
goto done;
}

if (ret == 0)
if (out_vq->num_free == 0)
port->outvq_full = true;

if (nonblock)
Expand Down

0 comments on commit 03227a3

Please sign in to comment.