From: Harvey Harrison Date: Wed, 30 Apr 2008 07:53:52 +0000 (-0700) Subject: cyclades.c: fix sparse shadowed variable warnings X-Git-Tag: v2.6.26-rc1~209 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a4e2351e7fcf2d10bb5524b0ace7797ffad4d98;p=linux-2.6 cyclades.c: fix sparse shadowed variable warnings 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 23312f2445..028db1b8fc 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -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;