All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hounschell <markh@compro.net>
To: driverdev-devel@linuxdriverproject.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH] staging: dgap: fix compile warnings by remove dead code
Date: Tue, 25 Feb 2014 10:02:53 -0500	[thread overview]
Message-ID: <1393340573-20714-1-git-send-email-markh@compro.net> (raw)
In-Reply-To: <68915035.102521.1393289271910.JavaMail.root@mx2.compro.net>

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>
---
 drivers/staging/dgap/dgap.c | 145 --------------------------------------------
 1 file changed, 145 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 21af5fa..7cb1ad5 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -197,9 +197,6 @@ static void dgap_remove_ports_sysfiles(struct board_t *bd);
 static void dgap_create_driver_sysfiles(struct pci_driver *);
 static void dgap_remove_driver_sysfiles(struct pci_driver *);
 
-static int dgap_tty_class_init(void);
-static int dgap_tty_class_destroy(void);
-
 static void dgap_create_tty_sysfs(struct un_t *un, struct device *c);
 static void dgap_remove_tty_sysfs(struct device *c);
 
@@ -210,12 +207,10 @@ static int dgap_parsefile(char **in, int Remove);
 static struct cnode *dgap_find_config(int type, int bus, int slot);
 static uint dgap_config_get_number_of_ports(struct board_t *bd);
 static char *dgap_create_config_string(struct board_t *bd, char *string);
-static char *dgap_get_config_letters(struct board_t *bd, char *string);
 static uint dgap_config_get_useintr(struct board_t *bd);
 static uint dgap_config_get_altpin(struct board_t *bd);
 
 static int	dgap_ms_sleep(ulong ms);
-static char	*dgap_ioctl_name(int cmd);
 static void	dgap_do_bios_load(struct board_t *brd, uchar __user *ubios, int len);
 static void	dgap_do_fep_load(struct board_t *brd, uchar __user *ufep, int len);
 #ifdef DIGI_CONCENTRATORS_SUPPORTED
@@ -390,29 +385,6 @@ static struct firmware_info fw_info[] = {
 	{0,}
 };
 
-static char *dgap_state_text[] = {
-	"Board Failed",
-	"Configuration for board not found.\n\t\t\tRun mpi to configure board.",
-	"Board Found",
-	"Need Reset",
-	"Finished Reset",
-	"Need Config",
-	"Finished Config",
-	"Need Device Creation",
-	"Requested Device Creation",
-	"Finished Device Creation",
-	"Need BIOS Load",
-	"Requested BIOS",
-	"Doing BIOS Load",
-	"Finished BIOS Load",
-	"Need FEP Load",
-	"Requested FEP",
-	"Doing FEP Load",
-	"Finished FEP Load",
-	"Requested PROC creation",
-	"Finished PROC creation",
-	"Board READY",
-};
 
 static char *dgap_driver_state_text[] = {
 	"Driver Initialized",
@@ -1421,57 +1393,6 @@ static int dgap_ms_sleep(ulong ms)
 
 
 
-/*
- *      dgap_ioctl_name() : Returns a text version of each ioctl value.
- */
-static char *dgap_ioctl_name(int cmd)
-{
-	switch(cmd) {
-
-	case TCGETA:		return("TCGETA");
-	case TCGETS:		return("TCGETS");
-	case TCSETA:		return("TCSETA");
-	case TCSETS:		return("TCSETS");
-	case TCSETAW:		return("TCSETAW");
-	case TCSETSW:		return("TCSETSW");
-	case TCSETAF:		return("TCSETAF");
-	case TCSETSF:		return("TCSETSF");
-	case TCSBRK:		return("TCSBRK");
-	case TCXONC:		return("TCXONC");
-	case TCFLSH:		return("TCFLSH");
-	case TIOCGSID:		return("TIOCGSID");
-
-	case TIOCGETD:		return("TIOCGETD");
-	case TIOCSETD:		return("TIOCSETD");
-	case TIOCGWINSZ:	return("TIOCGWINSZ");
-	case TIOCSWINSZ:	return("TIOCSWINSZ");
-
-	case TIOCMGET:		return("TIOCMGET");
-	case TIOCMSET:		return("TIOCMSET");
-	case TIOCMBIS:		return("TIOCMBIS");
-	case TIOCMBIC:		return("TIOCMBIC");
-
-	/* from digi.h */
-	case DIGI_SETA:		return("DIGI_SETA");
-	case DIGI_SETAW:	return("DIGI_SETAW");
-	case DIGI_SETAF:	return("DIGI_SETAF");
-	case DIGI_SETFLOW:	return("DIGI_SETFLOW");
-	case DIGI_SETAFLOW:	return("DIGI_SETAFLOW");
-	case DIGI_GETFLOW:	return("DIGI_GETFLOW");
-	case DIGI_GETAFLOW:	return("DIGI_GETAFLOW");
-	case DIGI_GETA:		return("DIGI_GETA");
-	case DIGI_GEDELAY:	return("DIGI_GEDELAY");
-	case DIGI_SEDELAY:	return("DIGI_SEDELAY");
-	case DIGI_GETCUSTOMBAUD: return("DIGI_GETCUSTOMBAUD");
-	case DIGI_SETCUSTOMBAUD: return("DIGI_SETCUSTOMBAUD");
-	case TIOCMODG:		return("TIOCMODG");
-	case TIOCMODS:		return("TIOCMODS");
-	case TIOCSDTR:		return("TIOCSDTR");
-	case TIOCCDTR:		return("TIOCCDTR");
-
-	default:		return("unknown");
-	}
-}
 
 /************************************************************************
  *
@@ -8559,69 +8480,3 @@ static char *dgap_create_config_string(struct board_t *bd, char *string)
 	*ptr = 0xff;
 	return string;
 }
-
-
-
-static char *dgap_get_config_letters(struct board_t *bd, char *string)
-{
-	int found = FALSE;
-	char *ptr = string;
-	struct cnode *cptr = NULL;
-	int len = 0;
-	int left = MAXTTYNAMELEN;
-
-	if (!bd) {
-		return "<NULL>";
-	}
-
-	for (cptr = bd->bd_config; cptr; cptr = cptr->next) {
-
-		if ((cptr->type == BNODE) &&
-		     ((cptr->u.board.type == APORT2_920P) || (cptr->u.board.type == APORT4_920P) ||
-		     (cptr->u.board.type == APORT8_920P) || (cptr->u.board.type == PAPORT4) ||
-		     (cptr->u.board.type == PAPORT8))) {
-
-			found = TRUE;
-		}
-
-		if (cptr->type == TNODE && found == TRUE) {
-			char *ptr1;
-			if (strstr(cptr->u.ttyname, "tty")) {
-				ptr1 = cptr->u.ttyname;
-				ptr1 += 3;
-			}
-			else {
-				ptr1 = cptr->u.ttyname;
-			}
-			if (ptr1) {
-				len = snprintf(ptr, left, "%s", ptr1);
-				left -= len;
-				ptr  += len;
-				if (left <= 0)
-					break;
-			}
-		}
-
-		if (cptr->type == CNODE) {
-			if (cptr->u.conc.id) {
-				len = snprintf(ptr, left, "%s", cptr->u.conc.id);
-				left -= len;
-				ptr  += len;
-				if (left <= 0)
-					break;
-			}
-                }
-
-		if (cptr->type == MNODE) {
-			if (cptr->u.module.id) {
-				len = snprintf(ptr, left, "%s", cptr->u.module.id);
-				left -= len;
-				ptr  += len;
-				if (left <= 0)
-					break;
-			}
-		}
-	}
-
-	return string;
-}
-- 
1.8.1.4

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

  parent reply	other threads:[~2014-02-25 15:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 18:11 [PATCH V3 00/19] staging: dgap: Digi International dgap driver Mark Hounschell
2014-02-19 18:11 ` [PATCH 01/19] staging: dgap: Remove CVS ID tags Mark Hounschell
2014-02-25  0:42   ` [PATCH 01/19] " Greg Kroah-Hartman
2014-02-19 18:11 ` [PATCH 02/19] staging: dgap: Remove userland source code files Mark Hounschell
2014-02-19 18:11 ` [PATCH 03/19] staging: dgap: Merge dgap_tty.c into dgap_driver.c Mark Hounschell
2014-02-19 18:12 ` [PATCH 04/19] staging: dgap: Merge dgap_fep5.c " Mark Hounschell
2014-02-19 18:12 ` [PATCH 05/19] staging: dgap: Merge dgap_sysfs.c " Mark Hounschell
2014-02-19 18:12 ` [PATCH 06/19] staging: dgap: Merge dgap_parses.c " Mark Hounschell
2014-02-19 18:12 ` [PATCH 07/19] staging: dgap: Remove unneeded dgap_trace.c and dgap_trace.h Mark Hounschell
2014-02-19 18:12 ` [PATCH 08/19] staging: dgap: Merge dgap_tty.h into dgap_driver.c Mark Hounschell
2014-02-19 18:12 ` [PATCH 09/19] staging: dgap: Merge dgap_sysfs.h " Mark Hounschell
2014-02-19 18:12 ` [PATCH 10/19] staging: dgap: Merge dgap_fep5.h into dgap_driver.h Mark Hounschell
2014-02-19 18:12 ` [PATCH 11/19] staging: dgap: Merge dgap_pci.h " Mark Hounschell
2014-02-19 18:12 ` [PATCH 12/19] staging: dgap: Merge dgap_conf.h " Mark Hounschell
2014-02-19 18:12 ` [PATCH 13/19] staging: dgap: Merge dgap_parse.h " Mark Hounschell
2014-02-19 18:12 ` [PATCH 14/19] staging: dgap: Merge dgap_kcompat.h " Mark Hounschell
2014-02-19 18:12 ` [PATCH 15/19] staging: dgap: Merge dgap_types.h " Mark Hounschell
2014-02-19 18:12 ` [PATCH 16/19] staging: dgap: Merge digi.h " Mark Hounschell
2014-02-19 18:12 ` [PATCH 17/19] staging: dgap: Make merged and local functions and variables static Mark Hounschell
2014-02-19 18:12 ` [PATCH 18/19] staging: dgap: Rename driver Mark Hounschell
2014-02-25  0:49   ` Greg Kroah-Hartman
     [not found]   ` <68915035.102521.1393289271910.JavaMail.root@mx2.compro.net>
2014-02-25  9:28     ` Mark Hounschell
2014-02-25 15:02     ` Mark Hounschell [this message]
2014-02-19 18:12 ` [PATCH 19/19] staging: dgap: Add in-kernel firmware loading support Mark Hounschell
2014-02-19 20:17   ` [PATCH 19/19] " Dan Carpenter
     [not found]   ` <2024027765.46695.1392841072739.JavaMail.root@mx2.compro.net>
2014-02-19 21:01     ` Mark Hounschell
2014-02-20  8:41       ` Dan Carpenter
2014-02-19 20:38 ` [PATCH V3 00/19] staging: dgap: Digi International dgap driver Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393340573-20714-1-git-send-email-markh@compro.net \
    --to=markh@compro.net \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.