All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/7] staging: dgap: cleanup duplicated warning message on dgap_tty_init()
@ 2014-08-09  5:37 ` Daeseok Youn
  0 siblings, 0 replies; 2+ messages in thread
From: Daeseok Youn @ 2014-08-09  5:37 UTC (permalink / raw)
  To: lidza.louina, markh
  Cc: markh, daeseok.youn, gregkh, driverdev-devel, devel, linux-kernel

If true_count is not same with brd->nasync, warning messages are
printed. But it has duplicated messages within if statement.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/dgap/dgap.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index b1253c0..51f9ebc 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -1374,19 +1374,14 @@ static int dgap_tty_init(struct board_t *brd)
 		brd->nasync = brd->maxports;
 
 	if (true_count != brd->nasync) {
-		if ((brd->type == PPCM) && (true_count == 64)) {
-			pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-				brd->name, brd->nasync, true_count);
-			pr_warn("dgap: Please make SURE the EBI cable running from the card\n");
-			pr_warn("dgap: to each EM module is plugged into EBI IN!\n");
-		} else if ((brd->type == PPCM) && (true_count == 0)) {
-			pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-				brd->name, brd->nasync, true_count);
+		pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
+			brd->name, brd->nasync, true_count);
+
+		if ((brd->type == PPCM) &&
+		    (true_count == 64 || true_count == 0)) {
 			pr_warn("dgap: Please make SURE the EBI cable running from the card\n");
 			pr_warn("dgap: to each EM module is plugged into EBI IN!\n");
-		} else
-			pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-				brd->name, brd->nasync, true_count);
+		}
 
 		brd->nasync = true_count;
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 3/7] staging: dgap: cleanup duplicated warning message on dgap_tty_init()
@ 2014-08-09  5:37 ` Daeseok Youn
  0 siblings, 0 replies; 2+ messages in thread
From: Daeseok Youn @ 2014-08-09  5:37 UTC (permalink / raw)
  To: lidza.louina, markh
  Cc: devel, gregkh, daeseok.youn, driverdev-devel, linux-kernel

If true_count is not same with brd->nasync, warning messages are
printed. But it has duplicated messages within if statement.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/dgap/dgap.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index b1253c0..51f9ebc 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -1374,19 +1374,14 @@ static int dgap_tty_init(struct board_t *brd)
 		brd->nasync = brd->maxports;
 
 	if (true_count != brd->nasync) {
-		if ((brd->type == PPCM) && (true_count == 64)) {
-			pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-				brd->name, brd->nasync, true_count);
-			pr_warn("dgap: Please make SURE the EBI cable running from the card\n");
-			pr_warn("dgap: to each EM module is plugged into EBI IN!\n");
-		} else if ((brd->type == PPCM) && (true_count == 0)) {
-			pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-				brd->name, brd->nasync, true_count);
+		pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
+			brd->name, brd->nasync, true_count);
+
+		if ((brd->type == PPCM) &&
+		    (true_count == 64 || true_count == 0)) {
 			pr_warn("dgap: Please make SURE the EBI cable running from the card\n");
 			pr_warn("dgap: to each EM module is plugged into EBI IN!\n");
-		} else
-			pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-				brd->name, brd->nasync, true_count);
+		}
 
 		brd->nasync = true_count;
 
-- 
1.7.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-09  5:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-09  5:37 [PATCH 3/7] staging: dgap: cleanup duplicated warning message on dgap_tty_init() Daeseok Youn
2014-08-09  5:37 ` Daeseok Youn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.