char: fix sparse shadowed variable warnings in esp.c
authorHarvey Harrison <harvey.harrison@gmail.com>
Wed, 30 Apr 2008 07:53:50 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:44 +0000 (08:29 -0700)
flags only use was in spin_lock_irqsave/spin_lock_irgrestore pairs, no
need to redeclare for each one.

drivers/char/esp.c:1599:17: warning: symbol 'flags' shadows an earlier one
drivers/char/esp.c:1517:16: originally declared here
drivers/char/esp.c:1615:17: warning: symbol 'flags' shadows an earlier one
drivers/char/esp.c:1517:16: originally declared here
drivers/char/esp.c:1631:17: warning: symbol 'flags' shadows an earlier one
drivers/char/esp.c:1517:16: 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/esp.c

index 5ad11a6716c7878edbd862f825d79244fbe30107..763d6d2e4b62118639c89cbd58498ff5d04c9ca1 100644 (file)
@@ -1600,8 +1600,6 @@ static int set_esp_config(struct esp_struct * info,
 
        if ((new_config.flow_off != info->config.flow_off) ||
            (new_config.flow_on != info->config.flow_on)) {
-               unsigned long flags;
-
                info->config.flow_off = new_config.flow_off;
                info->config.flow_on = new_config.flow_on;
 
@@ -1616,8 +1614,6 @@ static int set_esp_config(struct esp_struct * info,
 
        if ((new_config.rx_trigger != info->config.rx_trigger) ||
            (new_config.tx_trigger != info->config.tx_trigger)) {
-               unsigned long flags;
-
                info->config.rx_trigger = new_config.rx_trigger;
                info->config.tx_trigger = new_config.tx_trigger;
                spin_lock_irqsave(&info->lock, flags);
@@ -1632,8 +1628,6 @@ static int set_esp_config(struct esp_struct * info,
        }
 
        if (new_config.rx_timeout != info->config.rx_timeout) {
-               unsigned long flags;
-
                info->config.rx_timeout = new_config.rx_timeout;
                spin_lock_irqsave(&info->lock, flags);