diff options
author | Frank Pavlic <fpavlic@de.ibm.com> | 2006-03-22 16:03:41 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-22 20:29:30 -0500 |
commit | 1380fee2b553fbde1a094476685f43ec5625aec2 (patch) | |
tree | be0fb1266ce2706b624a157ed64de97a9c25ff67 /drivers/s390/net/qeth_proc.c | |
parent | 95f6b5a1e38e26dc313e283e1e6058d3ffff517d (diff) |
[PATCH] s390: qeth driver cleanups
[patch 3/6] s390: qeth driver cleanups
From: Ursula Braun <braunu@de.ibm.com>
- code analyzing tool BEAM has found some unreachable
and unnecessary statements and also conditions
which are always true.
- removed some useless MII code since OSA card will never
allow to set such values.
Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
diffstat:
qeth_main.c | 49 ++++---------------------------------------------
qeth_proc.c | 18 +++++++++---------
qeth_sys.c | 2 +-
3 files changed, 14 insertions(+), 55 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/s390/net/qeth_proc.c')
-rw-r--r-- | drivers/s390/net/qeth_proc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c index 1304641545d..360d782c7ad 100644 --- a/drivers/s390/net/qeth_proc.c +++ b/drivers/s390/net/qeth_proc.c @@ -74,7 +74,7 @@ qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) static inline const char * qeth_get_router_str(struct qeth_card *card, int ipv) { - int routing_type = 0; + enum qeth_routing_types routing_type = NO_ROUTER; if (ipv == 4) { routing_type = card->options.route4.type; @@ -86,26 +86,26 @@ qeth_get_router_str(struct qeth_card *card, int ipv) #endif /* CONFIG_QETH_IPV6 */ } - if (routing_type == PRIMARY_ROUTER) + switch (routing_type){ + case PRIMARY_ROUTER: return "pri"; - else if (routing_type == SECONDARY_ROUTER) + case SECONDARY_ROUTER: return "sec"; - else if (routing_type == MULTICAST_ROUTER) { + case MULTICAST_ROUTER: if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) return "mc+"; return "mc"; - } else if (routing_type == PRIMARY_CONNECTOR) { + case PRIMARY_CONNECTOR: if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) return "p+c"; return "p.c"; - } else if (routing_type == SECONDARY_CONNECTOR) { + case SECONDARY_CONNECTOR: if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) return "s+c"; return "s.c"; - } else if (routing_type == NO_ROUTER) + default: /* NO_ROUTER */ return "no"; - else - return "unk"; + } } static int |