]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
virtio: console: rename variable
authorAmit Shah <amit.shah@redhat.com>
Wed, 14 Sep 2011 07:36:44 +0000 (13:06 +0530)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 15 Sep 2011 00:38:14 +0000 (10:38 +1000)
'ret' is a misnomer in discard_port_data() since we don't return the
value.  Rename it to 'err'.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c

index cb5edf33bebfb24a3f2574216bd0ac088411485b..0538425e9a71f52d1f7c749a174308b0b1893a47 100644 (file)
@@ -387,8 +387,7 @@ static void discard_port_data(struct port *port)
 {
        struct port_buffer *buf;
        struct virtqueue *vq;
-       unsigned int len;
-       int ret;
+       unsigned int len, err;
 
        if (!port->portdev) {
                /* Device has been unplugged.  vqs are already gone. */
@@ -400,18 +399,18 @@ static void discard_port_data(struct port *port)
        else
                buf = virtqueue_get_buf(vq, &len);
 
-       ret = 0;
+       err = 0;
        while (buf) {
                if (add_inbuf(vq, buf) < 0) {
-                       ret++;
+                       err++;
                        free_buf(buf);
                }
                buf = virtqueue_get_buf(vq, &len);
        }
        port->inbuf = NULL;
-       if (ret)
+       if (err)
                dev_warn(port->dev, "Errors adding %d buffers back to vq\n",
-                        ret);
+                        err);
 }
 
 static bool port_has_data(struct port *port)