diff options
author | Hannes Eder <hannes@hanneseder.net> | 2009-02-14 21:13:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-17 22:49:21 -0500 |
commit | ad7bf428328d360b54e0d5f5fc7a9c0a6cf3b7fe (patch) | |
tree | 4860ebd4ff5455bf8f36d9837661720d80bd8565 /drivers/net/tokenring | |
parent | 7f50ca07fffdfa8f74ff62e54bf569c745e906e5 (diff) |
drivers/net/tokenring: fix sparse warning: cast truncates bits from const value
Impact: Remove the write-only field 'current_ring_status' completely.
Fix this sparse warnings:
drivers/net/tokenring/smctr.c:4410:52: warning: cast truncates bits from constant value (100 becomes 0)
drivers/net/tokenring/smctr.c:4415:52: warning: cast truncates bits from constant value (400 becomes 0)
drivers/net/tokenring/smctr.c:4420:52: warning: cast truncates bits from constant value (800 becomes 0)
drivers/net/tokenring/smctr.c:4425:52: warning: cast truncates bits from constant value (1000 becomes 0)
drivers/net/tokenring/smctr.c:4430:52: warning: cast truncates bits from constant value (2000 becomes 0)
drivers/net/tokenring/smctr.c:4435:52: warning: cast truncates bits from constant value (4000 becomes 0)
drivers/net/tokenring/smctr.c:4440:52: warning: cast truncates bits from constant value (8000 becomes 0)
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r-- | drivers/net/tokenring/smctr.c | 10 | ||||
-rw-r--r-- | drivers/net/tokenring/smctr.h | 1 |
2 files changed, 0 insertions, 11 deletions
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index a8a5b4c4bd4d..9d7db2c8d661 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -4393,52 +4393,42 @@ static int smctr_ring_status_chg(struct net_device *dev) | |||
4393 | { | 4393 | { |
4394 | case RING_RECOVERY: | 4394 | case RING_RECOVERY: |
4395 | printk(KERN_INFO "%s: Ring Recovery\n", dev->name); | 4395 | printk(KERN_INFO "%s: Ring Recovery\n", dev->name); |
4396 | tp->current_ring_status |= RING_RECOVERY; | ||
4397 | break; | 4396 | break; |
4398 | 4397 | ||
4399 | case SINGLE_STATION: | 4398 | case SINGLE_STATION: |
4400 | printk(KERN_INFO "%s: Single Statinon\n", dev->name); | 4399 | printk(KERN_INFO "%s: Single Statinon\n", dev->name); |
4401 | tp->current_ring_status |= SINGLE_STATION; | ||
4402 | break; | 4400 | break; |
4403 | 4401 | ||
4404 | case COUNTER_OVERFLOW: | 4402 | case COUNTER_OVERFLOW: |
4405 | printk(KERN_INFO "%s: Counter Overflow\n", dev->name); | 4403 | printk(KERN_INFO "%s: Counter Overflow\n", dev->name); |
4406 | tp->current_ring_status |= COUNTER_OVERFLOW; | ||
4407 | break; | 4404 | break; |
4408 | 4405 | ||
4409 | case REMOVE_RECEIVED: | 4406 | case REMOVE_RECEIVED: |
4410 | printk(KERN_INFO "%s: Remove Received\n", dev->name); | 4407 | printk(KERN_INFO "%s: Remove Received\n", dev->name); |
4411 | tp->current_ring_status |= REMOVE_RECEIVED; | ||
4412 | break; | 4408 | break; |
4413 | 4409 | ||
4414 | case AUTO_REMOVAL_ERROR: | 4410 | case AUTO_REMOVAL_ERROR: |
4415 | printk(KERN_INFO "%s: Auto Remove Error\n", dev->name); | 4411 | printk(KERN_INFO "%s: Auto Remove Error\n", dev->name); |
4416 | tp->current_ring_status |= AUTO_REMOVAL_ERROR; | ||
4417 | break; | 4412 | break; |
4418 | 4413 | ||
4419 | case LOBE_WIRE_FAULT: | 4414 | case LOBE_WIRE_FAULT: |
4420 | printk(KERN_INFO "%s: Lobe Wire Fault\n", dev->name); | 4415 | printk(KERN_INFO "%s: Lobe Wire Fault\n", dev->name); |
4421 | tp->current_ring_status |= LOBE_WIRE_FAULT; | ||
4422 | break; | 4416 | break; |
4423 | 4417 | ||
4424 | case TRANSMIT_BEACON: | 4418 | case TRANSMIT_BEACON: |
4425 | printk(KERN_INFO "%s: Transmit Beacon\n", dev->name); | 4419 | printk(KERN_INFO "%s: Transmit Beacon\n", dev->name); |
4426 | tp->current_ring_status |= TRANSMIT_BEACON; | ||
4427 | break; | 4420 | break; |
4428 | 4421 | ||
4429 | case SOFT_ERROR: | 4422 | case SOFT_ERROR: |
4430 | printk(KERN_INFO "%s: Soft Error\n", dev->name); | 4423 | printk(KERN_INFO "%s: Soft Error\n", dev->name); |
4431 | tp->current_ring_status |= SOFT_ERROR; | ||
4432 | break; | 4424 | break; |
4433 | 4425 | ||
4434 | case HARD_ERROR: | 4426 | case HARD_ERROR: |
4435 | printk(KERN_INFO "%s: Hard Error\n", dev->name); | 4427 | printk(KERN_INFO "%s: Hard Error\n", dev->name); |
4436 | tp->current_ring_status |= HARD_ERROR; | ||
4437 | break; | 4428 | break; |
4438 | 4429 | ||
4439 | case SIGNAL_LOSS: | 4430 | case SIGNAL_LOSS: |
4440 | printk(KERN_INFO "%s: Signal Loss\n", dev->name); | 4431 | printk(KERN_INFO "%s: Signal Loss\n", dev->name); |
4441 | tp->current_ring_status |= SIGNAL_LOSS; | ||
4442 | break; | 4432 | break; |
4443 | 4433 | ||
4444 | default: | 4434 | default: |
diff --git a/drivers/net/tokenring/smctr.h b/drivers/net/tokenring/smctr.h index 52df7dd815cc..6e5700ab4fc3 100644 --- a/drivers/net/tokenring/smctr.h +++ b/drivers/net/tokenring/smctr.h | |||
@@ -977,7 +977,6 @@ typedef struct net_local { | |||
977 | __u8 monitor_state_ready; | 977 | __u8 monitor_state_ready; |
978 | __u16 ring_status; | 978 | __u16 ring_status; |
979 | __u8 ring_status_flags; | 979 | __u8 ring_status_flags; |
980 | __u8 current_ring_status; | ||
981 | __u8 state; | 980 | __u8 state; |
982 | 981 | ||
983 | __u8 join_state; | 982 | __u8 join_state; |