From: Adrian Bunk <bunk@stusta.de>
To: linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/char/ip2*: cleanups
Date: Sun, 17 Apr 2005 22:05:23 +0200 [thread overview]
Message-ID: <20050417200523.GI3625@stusta.de> (raw)
This patch contains the following cleanups:
- i2cmd.c: #if 0 the unused function i2cmdUnixFlags
- i2cmd.c: make the needlessly global funciton i2cmdBaudDef static
- ip2main.c: remove dead code that wasn't reachable due to an #ifdef
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/char/ip2/i2cmd.c | 4 +++-
drivers/char/ip2/i2cmd.h | 12 ++----------
drivers/char/ip2main.c | 10 ----------
3 files changed, 5 insertions(+), 21 deletions(-)
--- linux-2.6.12-rc2-mm3-full/drivers/char/ip2/i2cmd.h.old 2005-04-17 18:04:22.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/char/ip2/i2cmd.h 2005-04-17 19:08:54.000000000 +0200
@@ -64,16 +64,6 @@
// directly from user-level
#define VAR 0x10 // This command is of variable length!
-//-----------------------------------
-// External declarations for i2cmd.c
-//-----------------------------------
-// Routine to set up parameters for the "define hot-key sequence" command. Since
-// there is more than one parameter to assign, we must use a function rather
-// than a macro (used usually).
-//
-extern cmdSyntaxPtr i2cmdUnixFlags(USHORT iflag,USHORT cflag,USHORT lflag);
-extern cmdSyntaxPtr i2cmdBaudDef(int which, USHORT rate);
-
// Declarations for the global arrays used to bear the commands and their
// arguments.
//
@@ -433,6 +423,7 @@
#define CMD_HOT_ENAB (cmdSyntaxPtr)(ct45) // Enable Hot-key checking
#define CMD_HOT_DSAB (cmdSyntaxPtr)(ct46) // Disable Hot-key checking
+#if 0
// COMMAND 47: Send Protocol info via Unix flags:
// iflag = Unix tty t_iflag
// cflag = Unix tty t_cflag
@@ -441,6 +432,7 @@
// within these flags
//
#define CMD_UNIX_FLAGS(iflag,cflag,lflag) i2cmdUnixFlags(iflag,cflag,lflag)
+#endif /* 0 */
#define CMD_DSRFL_ENAB (cmdSyntaxPtr)(ct48) // Enable DSR receiver ctrl
#define CMD_DSRFL_DSAB (cmdSyntaxPtr)(ct49) // Disable DSR receiver ctrl
--- linux-2.6.12-rc2-mm3-full/drivers/char/ip2/i2cmd.c.old 2005-04-17 18:04:42.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/char/ip2/i2cmd.c 2005-04-17 19:09:27.000000000 +0200
@@ -162,6 +162,7 @@
// This routine sets the parameters of command 47 and returns a pointer to the
// appropriate structure.
//******************************************************************************
+#if 0
cmdSyntaxPtr
i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag)
{
@@ -175,6 +176,7 @@
pCM->cmd[6] = (unsigned char) (lflag >> 8);
return pCM;
}
+#endif /* 0 */
//******************************************************************************
// Function: i2cmdBaudDef(which, rate)
@@ -187,7 +189,7 @@
// This routine sets the parameters of commands 54 or 55 (according to the
// argument which), and returns a pointer to the appropriate structure.
//******************************************************************************
-cmdSyntaxPtr
+static cmdSyntaxPtr
i2cmdBaudDef(int which, unsigned short rate)
{
cmdSyntaxPtr pCM;
--- linux-2.6.12-rc2-mm3-full/drivers/char/ip2main.c.old 2005-04-17 19:09:40.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/char/ip2main.c 2005-04-17 19:09:53.000000000 +0200
@@ -2691,16 +2691,6 @@
pCh->flags |= ASYNC_CHECK_CD;
}
-#ifdef XXX
-do_flags_thing: // This is a test, we don't do the flags thing
-
- if ( (cflag & CRTSCTS) ) {
- cflag |= 014000000000;
- }
- i2QueueCommands(PTYPE_BYPASS, pCh, 100, 1,
- CMD_UNIX_FLAGS(iflag,cflag,lflag));
-#endif
-
service_it:
i2DrainOutput( pCh, 100 );
}
next reply other threads:[~2005-04-17 20:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-17 20:05 Adrian Bunk [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-30 20:08 [2.6 patch] drivers/char/ip2*: cleanups Adrian Bunk
2005-05-13 0:47 Adrian Bunk
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=20050417200523.GI3625@stusta.de \
--to=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.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.