Skip to content

Commit

Permalink
char: fix sparse shadowed variable warnings in esp.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Harvey Harrison authored and Linus Torvalds committed Apr 30, 2008
1 parent ec09cd5 commit f559226
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/char/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit f559226

Please sign in to comment.