Skip to content

Commit 35edf11

Browse files
daeseokyoungregkh
authored andcommitted
staging: dgap: cleanup duplicated warning message on dgap_tty_init()
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 274d8b3 commit 35edf11

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

‎drivers/staging/dgap/dgap.c‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,19 +1374,14 @@ static int dgap_tty_init(struct board_t *brd)
13741374
brd->nasync = brd->maxports;
13751375

13761376
if (true_count != brd->nasync) {
1377-
if ((brd->type == PPCM) && (true_count == 64)) {
1378-
pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
1379-
brd->name, brd->nasync, true_count);
1380-
pr_warn("dgap: Please make SURE the EBI cable running from the card\n");
1381-
pr_warn("dgap: to each EM module is plugged into EBI IN!\n");
1382-
} else if ((brd->type == PPCM) && (true_count == 0)) {
1383-
pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
1384-
brd->name, brd->nasync, true_count);
1377+
pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
1378+
brd->name, brd->nasync, true_count);
1379+
1380+
if ((brd->type == PPCM) &&
1381+
(true_count == 64 || true_count == 0)) {
13851382
pr_warn("dgap: Please make SURE the EBI cable running from the card\n");
13861383
pr_warn("dgap: to each EM module is plugged into EBI IN!\n");
1387-
} else
1388-
pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
1389-
brd->name, brd->nasync, true_count);
1384+
}
13901385

13911386
brd->nasync = true_count;
13921387

0 commit comments

Comments
 (0)