Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: dgap: fix compile warnings by remove dead code

The last patch series exposed some dead code causing compile warnings.
This patch removes that dead code and fixes the warnings

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Mark Hounschell and committed by
Greg Kroah-Hartman
e0f9dfaf 29f81385

-145
-145
drivers/staging/dgap/dgap.c
··· 197 197 static void dgap_create_driver_sysfiles(struct pci_driver *); 198 198 static void dgap_remove_driver_sysfiles(struct pci_driver *); 199 199 200 - static int dgap_tty_class_init(void); 201 - static int dgap_tty_class_destroy(void); 202 - 203 200 static void dgap_create_tty_sysfs(struct un_t *un, struct device *c); 204 201 static void dgap_remove_tty_sysfs(struct device *c); 205 202 ··· 207 210 static struct cnode *dgap_find_config(int type, int bus, int slot); 208 211 static uint dgap_config_get_number_of_ports(struct board_t *bd); 209 212 static char *dgap_create_config_string(struct board_t *bd, char *string); 210 - static char *dgap_get_config_letters(struct board_t *bd, char *string); 211 213 static uint dgap_config_get_useintr(struct board_t *bd); 212 214 static uint dgap_config_get_altpin(struct board_t *bd); 213 215 214 216 static int dgap_ms_sleep(ulong ms); 215 - static char *dgap_ioctl_name(int cmd); 216 217 static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios, int len); 217 218 static void dgap_do_fep_load(struct board_t *brd, uchar __user *ufep, int len); 218 219 #ifdef DIGI_CONCENTRATORS_SUPPORTED ··· 385 390 {0,} 386 391 }; 387 392 388 - static char *dgap_state_text[] = { 389 - "Board Failed", 390 - "Configuration for board not found.\n\t\t\tRun mpi to configure board.", 391 - "Board Found", 392 - "Need Reset", 393 - "Finished Reset", 394 - "Need Config", 395 - "Finished Config", 396 - "Need Device Creation", 397 - "Requested Device Creation", 398 - "Finished Device Creation", 399 - "Need BIOS Load", 400 - "Requested BIOS", 401 - "Doing BIOS Load", 402 - "Finished BIOS Load", 403 - "Need FEP Load", 404 - "Requested FEP", 405 - "Doing FEP Load", 406 - "Finished FEP Load", 407 - "Requested PROC creation", 408 - "Finished PROC creation", 409 - "Board READY", 410 - }; 411 393 412 394 static char *dgap_driver_state_text[] = { 413 395 "Driver Initialized", ··· 1393 1421 1394 1422 1395 1423 1396 - /* 1397 - * dgap_ioctl_name() : Returns a text version of each ioctl value. 1398 - */ 1399 - static char *dgap_ioctl_name(int cmd) 1400 - { 1401 - switch(cmd) { 1402 - 1403 - case TCGETA: return("TCGETA"); 1404 - case TCGETS: return("TCGETS"); 1405 - case TCSETA: return("TCSETA"); 1406 - case TCSETS: return("TCSETS"); 1407 - case TCSETAW: return("TCSETAW"); 1408 - case TCSETSW: return("TCSETSW"); 1409 - case TCSETAF: return("TCSETAF"); 1410 - case TCSETSF: return("TCSETSF"); 1411 - case TCSBRK: return("TCSBRK"); 1412 - case TCXONC: return("TCXONC"); 1413 - case TCFLSH: return("TCFLSH"); 1414 - case TIOCGSID: return("TIOCGSID"); 1415 - 1416 - case TIOCGETD: return("TIOCGETD"); 1417 - case TIOCSETD: return("TIOCSETD"); 1418 - case TIOCGWINSZ: return("TIOCGWINSZ"); 1419 - case TIOCSWINSZ: return("TIOCSWINSZ"); 1420 - 1421 - case TIOCMGET: return("TIOCMGET"); 1422 - case TIOCMSET: return("TIOCMSET"); 1423 - case TIOCMBIS: return("TIOCMBIS"); 1424 - case TIOCMBIC: return("TIOCMBIC"); 1425 - 1426 - /* from digi.h */ 1427 - case DIGI_SETA: return("DIGI_SETA"); 1428 - case DIGI_SETAW: return("DIGI_SETAW"); 1429 - case DIGI_SETAF: return("DIGI_SETAF"); 1430 - case DIGI_SETFLOW: return("DIGI_SETFLOW"); 1431 - case DIGI_SETAFLOW: return("DIGI_SETAFLOW"); 1432 - case DIGI_GETFLOW: return("DIGI_GETFLOW"); 1433 - case DIGI_GETAFLOW: return("DIGI_GETAFLOW"); 1434 - case DIGI_GETA: return("DIGI_GETA"); 1435 - case DIGI_GEDELAY: return("DIGI_GEDELAY"); 1436 - case DIGI_SEDELAY: return("DIGI_SEDELAY"); 1437 - case DIGI_GETCUSTOMBAUD: return("DIGI_GETCUSTOMBAUD"); 1438 - case DIGI_SETCUSTOMBAUD: return("DIGI_SETCUSTOMBAUD"); 1439 - case TIOCMODG: return("TIOCMODG"); 1440 - case TIOCMODS: return("TIOCMODS"); 1441 - case TIOCSDTR: return("TIOCSDTR"); 1442 - case TIOCCDTR: return("TIOCCDTR"); 1443 - 1444 - default: return("unknown"); 1445 - } 1446 - } 1447 1424 1448 1425 /************************************************************************ 1449 1426 * ··· 8478 8557 } 8479 8558 8480 8559 *ptr = 0xff; 8481 - return string; 8482 - } 8483 - 8484 - 8485 - 8486 - static char *dgap_get_config_letters(struct board_t *bd, char *string) 8487 - { 8488 - int found = FALSE; 8489 - char *ptr = string; 8490 - struct cnode *cptr = NULL; 8491 - int len = 0; 8492 - int left = MAXTTYNAMELEN; 8493 - 8494 - if (!bd) { 8495 - return "<NULL>"; 8496 - } 8497 - 8498 - for (cptr = bd->bd_config; cptr; cptr = cptr->next) { 8499 - 8500 - if ((cptr->type == BNODE) && 8501 - ((cptr->u.board.type == APORT2_920P) || (cptr->u.board.type == APORT4_920P) || 8502 - (cptr->u.board.type == APORT8_920P) || (cptr->u.board.type == PAPORT4) || 8503 - (cptr->u.board.type == PAPORT8))) { 8504 - 8505 - found = TRUE; 8506 - } 8507 - 8508 - if (cptr->type == TNODE && found == TRUE) { 8509 - char *ptr1; 8510 - if (strstr(cptr->u.ttyname, "tty")) { 8511 - ptr1 = cptr->u.ttyname; 8512 - ptr1 += 3; 8513 - } 8514 - else { 8515 - ptr1 = cptr->u.ttyname; 8516 - } 8517 - if (ptr1) { 8518 - len = snprintf(ptr, left, "%s", ptr1); 8519 - left -= len; 8520 - ptr += len; 8521 - if (left <= 0) 8522 - break; 8523 - } 8524 - } 8525 - 8526 - if (cptr->type == CNODE) { 8527 - if (cptr->u.conc.id) { 8528 - len = snprintf(ptr, left, "%s", cptr->u.conc.id); 8529 - left -= len; 8530 - ptr += len; 8531 - if (left <= 0) 8532 - break; 8533 - } 8534 - } 8535 - 8536 - if (cptr->type == MNODE) { 8537 - if (cptr->u.module.id) { 8538 - len = snprintf(ptr, left, "%s", cptr->u.module.id); 8539 - left -= len; 8540 - ptr += len; 8541 - if (left <= 0) 8542 - break; 8543 - } 8544 - } 8545 - } 8546 - 8547 8560 return string; 8548 8561 }