]> err.no Git - linux-2.6/commitdiff
cyclades.c: fix sparse shadowed variable warnings
authorHarvey Harrison <harvey.harrison@gmail.com>
Wed, 30 Apr 2008 07:53:52 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:44 +0000 (08:29 -0700)
Nested min() macros.
drivers/char/cyclades.c:2750:7: warning: symbol '_x' shadows an earlier one
drivers/char/cyclades.c:2750:7: originally declared here
drivers/char/cyclades.c:2750:7: warning: symbol '_x' shadows an earlier one
drivers/char/cyclades.c:2750:7: originally declared here
drivers/char/cyclades.c:2750:7: warning: symbol '_y' shadows an earlier one
drivers/char/cyclades.c:2750:7: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/cyclades.c

index 23312f244545ee2deb545899723a7fe01714e68a..028db1b8fc4eba6c5d0d8530e5143dfbb42805f2 100644 (file)
@@ -2747,8 +2747,8 @@ static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count)
 
        spin_lock_irqsave(&info->card->card_lock, flags);
        while (1) {
-               c = min(count, min((int)(SERIAL_XMIT_SIZE - info->xmit_cnt - 1),
-                                  (int)(SERIAL_XMIT_SIZE - info->xmit_head)));
+               c = min(count, (int)(SERIAL_XMIT_SIZE - info->xmit_cnt - 1));
+               c = min(c, (int)(SERIAL_XMIT_SIZE - info->xmit_head));
 
                if (c <= 0)
                        break;