aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_proc.c
diff options
context:
space:
mode:
authorFrank Pavlic <fpavlic@de.ibm.com>2006-03-22 10:03:41 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-22 20:29:30 -0500
commit1380fee2b553fbde1a094476685f43ec5625aec2 (patch)
treebe0fb1266ce2706b624a157ed64de97a9c25ff67 /drivers/s390/net/qeth_proc.c
parent95f6b5a1e38e26dc313e283e1e6058d3ffff517d (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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c
index 1304641545df..360d782c7ada 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)
74static inline const char * 74static inline const char *
75qeth_get_router_str(struct qeth_card *card, int ipv) 75qeth_get_router_str(struct qeth_card *card, int ipv)
76{ 76{
77 int routing_type = 0; 77 enum qeth_routing_types routing_type = NO_ROUTER;
78 78
79 if (ipv == 4) { 79 if (ipv == 4) {
80 routing_type = card->options.route4.type; 80 routing_type = card->options.route4.type;
@@ -86,26 +86,26 @@ qeth_get_router_str(struct qeth_card *card, int ipv)
86#endif /* CONFIG_QETH_IPV6 */ 86#endif /* CONFIG_QETH_IPV6 */
87 } 87 }
88 88
89 if (routing_type == PRIMARY_ROUTER) 89 switch (routing_type){
90 case PRIMARY_ROUTER:
90 return "pri"; 91 return "pri";
91 else if (routing_type == SECONDARY_ROUTER) 92 case SECONDARY_ROUTER:
92 return "sec"; 93 return "sec";
93 else if (routing_type == MULTICAST_ROUTER) { 94 case MULTICAST_ROUTER:
94 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) 95 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
95 return "mc+"; 96 return "mc+";
96 return "mc"; 97 return "mc";
97 } else if (routing_type == PRIMARY_CONNECTOR) { 98 case PRIMARY_CONNECTOR:
98 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) 99 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
99 return "p+c"; 100 return "p+c";
100 return "p.c"; 101 return "p.c";
101 } else if (routing_type == SECONDARY_CONNECTOR) { 102 case SECONDARY_CONNECTOR:
102 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) 103 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
103 return "s+c"; 104 return "s+c";
104 return "s.c"; 105 return "s.c";
105 } else if (routing_type == NO_ROUTER) 106 default: /* NO_ROUTER */
106 return "no"; 107 return "no";
107 else 108 }
108 return "unk";
109} 109}
110 110
111static int 111static int