* [2.6 patch] serial_core.c: remove an unused function
@ 2004-10-28 23:22 Adrian Bunk
2004-10-29 0:27 ` Adrian Bunk
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2004-10-28 23:22 UTC (permalink / raw)
To: linux-kernel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The patch below removes an unused function from
drivers/serial/serial_core.c
diffstat output:
drivers/serial/serial_core.c | 40 -----------------------------------
1 files changed, 40 deletions(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
- --- linux-2.6.10-rc1-mm1-full/drivers/serial/serial_core.c.old 2004-10-28 23:28:48.000000000 +0200
+++ linux-2.6.10-rc1-mm1-full/drivers/serial/serial_core.c 2004-10-28 23:28:58.000000000 +0200
@@ -444,46 +444,6 @@
}
static inline int
- -__uart_user_write(struct uart_port *port, struct circ_buf *circ,
- - const unsigned char __user *buf, int count)
- -{
- - unsigned long flags;
- - int c, ret = 0;
- -
- - if (down_interruptible(&port->info->tmpbuf_sem))
- - return -EINTR;
- -
- - while (1) {
- - int c1;
- - c = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE);
- - if (count < c)
- - c = count;
- - if (c <= 0)
- - break;
- -
- - c -= copy_from_user(port->info->tmpbuf, buf, c);
- - if (!c) {
- - if (!ret)
- - ret = -EFAULT;
- - break;
- - }
- - spin_lock_irqsave(&port->lock, flags);
- - c1 = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE);
- - if (c1 < c)
- - c = c1;
- - memcpy(circ->buf + circ->head, port->info->tmpbuf, c);
- - circ->head = (circ->head + c) & (UART_XMIT_SIZE - 1);
- - spin_unlock_irqrestore(&port->lock, flags);
- - buf += c;
- - count -= c;
- - ret += c;
- - }
- - up(&port->info->tmpbuf_sem);
- -
- - return ret;
- -}
- -
- -static inline int
__uart_kern_write(struct uart_port *port, struct circ_buf *circ,
const unsigned char *buf, int count)
{
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFBgX8smfzqmE8StAARAqE1AJ9dRUsN9r2xdA9EFQN5/fHXicotmgCdGx+4
jnmHYPR4TUjMXwXiN2btqDs=
=PE8M
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
* [2.6 patch] serial_core.c: remove an unused function
2004-10-28 23:22 [2.6 patch] serial_core.c: remove an unused function Adrian Bunk
@ 2004-10-29 0:27 ` Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2004-10-29 0:27 UTC (permalink / raw)
To: linux-kernel
[ this time without the problems due to a digital signature... ]
The patch below removes an unused function from
drivers/serial/serial_core.c
diffstat output:
drivers/serial/serial_core.c | 40 -----------------------------------
1 files changed, 40 deletions(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-rc1-mm1-full/drivers/serial/serial_core.c.old 2004-10-28 23:28:48.000000000 +0200
+++ linux-2.6.10-rc1-mm1-full/drivers/serial/serial_core.c 2004-10-28 23:28:58.000000000 +0200
@@ -444,46 +444,6 @@
}
static inline int
-__uart_user_write(struct uart_port *port, struct circ_buf *circ,
- const unsigned char __user *buf, int count)
-{
- unsigned long flags;
- int c, ret = 0;
-
- if (down_interruptible(&port->info->tmpbuf_sem))
- return -EINTR;
-
- while (1) {
- int c1;
- c = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE);
- if (count < c)
- c = count;
- if (c <= 0)
- break;
-
- c -= copy_from_user(port->info->tmpbuf, buf, c);
- if (!c) {
- if (!ret)
- ret = -EFAULT;
- break;
- }
- spin_lock_irqsave(&port->lock, flags);
- c1 = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE);
- if (c1 < c)
- c = c1;
- memcpy(circ->buf + circ->head, port->info->tmpbuf, c);
- circ->head = (circ->head + c) & (UART_XMIT_SIZE - 1);
- spin_unlock_irqrestore(&port->lock, flags);
- buf += c;
- count -= c;
- ret += c;
- }
- up(&port->info->tmpbuf_sem);
-
- return ret;
-}
-
-static inline int
__uart_kern_write(struct uart_port *port, struct circ_buf *circ,
const unsigned char *buf, int count)
{
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-29 0:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28 23:22 [2.6 patch] serial_core.c: remove an unused function Adrian Bunk
2004-10-29 0:27 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox