Patchwork [4/5] qeth: display service_level info only when valid.

login
register
mail settings
Submitter frank.blaschka@de.ibm.com
Date Aug. 26, 2009, 12:01 p.m.
Message ID <20090826120136.382656000@de.ibm.com>
Download mbox | patch
Permalink /patch/32136/
State Accepted
Delegated to: David Miller
Headers show

Comments

frank.blaschka@de.ibm.com - Aug. 26, 2009, 12:01 p.m.
From: Klaus-Dieter Wacker <kdwacker@de.ibm.com>

qeth displayed an entry in /proc/service_level even when no valid
MCL-string was available (the MCL info is blank). The change is to
create an entry in /proc/service_level only when MCL-string is
non-zero.

Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com> 
---

 drivers/s390/net/qeth_core_main.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: git_net-next/drivers/s390/net/qeth_core_main.c
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_core_main.c
+++ git_net-next/drivers/s390/net/qeth_core_main.c
@@ -1160,8 +1160,9 @@  static void qeth_core_sl_print(struct se
 {
 	struct qeth_card *card = container_of(slr, struct qeth_card,
 					qeth_service_level);
-	seq_printf(m, "qeth: %s firmware level %s\n", CARD_BUS_ID(card),
-			card->info.mcl_level);
+	if (card->info.mcl_level[0])
+		seq_printf(m, "qeth: %s firmware level %s\n",
+			CARD_BUS_ID(card), card->info.mcl_level);
 }
 
 static struct qeth_card *qeth_alloc_card(void)