tty: Use generic names for flip buffer list cursors
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 15 Jun 2013 13:36:05 +0000 (09:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:47:08 +0000 (16:47 -0700)
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_buffer.c

index a428fa2f72596462b2a083c496832ed112d4b4ec..0259a766b8752cc190f1eec53b49d53a485ef91e 100644 (file)
@@ -44,15 +44,15 @@ static void tty_buffer_reset(struct tty_buffer *p, size_t size)
 void tty_buffer_free_all(struct tty_port *port)
 {
        struct tty_bufhead *buf = &port->buf;
-       struct tty_buffer *thead;
+       struct tty_buffer *p;
 
-       while ((thead = buf->head) != NULL) {
-               buf->head = thead->next;
-               kfree(thead);
+       while ((p = buf->head) != NULL) {
+               buf->head = p->next;
+               kfree(p);
        }
-       while ((thead = buf->free) != NULL) {
-               buf->free = thead->next;
-               kfree(thead);
+       while ((p = buf->free) != NULL) {
+               buf->free = p->next;
+               kfree(p);
        }
        buf->tail = NULL;
        buf->memory_used = 0;
@@ -143,13 +143,13 @@ static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
 static void __tty_buffer_flush(struct tty_port *port)
 {
        struct tty_bufhead *buf = &port->buf;
-       struct tty_buffer *thead;
+       struct tty_buffer *next;
 
        if (unlikely(buf->head == NULL))
                return;
-       while ((thead = buf->head->next) != NULL) {
+       while ((next = buf->head->next) != NULL) {
                tty_buffer_free(port, buf->head);
-               buf->head = thead;
+               buf->head = next;
        }
        WARN_ON(buf->head != buf->tail);
        buf->head->read = buf->head->commit;