# \[PATCH 42/68\] TTY: simserial, remove tmp\_buf

- From: Jiri Slaby \<hidden\>
- Date: 2012-03-05 14:08:55 
- List: linux-serial
- Page: https://ratatoskr.run/linux-serial/2012/03/3830763
- Thread: https://ratatoskr.run/linux-serial/2012/03/3830764/t.md

```text
It is totally unused.

Signed-off-by: Jiri Slaby <redacted>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <redacted>
---
 arch/ia64/hp/sim/simserial.c |   16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 64ab004..45df0f4 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -55,8 +55,6 @@ struct tty_driver *hp_simserial_driver;
 
 static struct console *console;
 
-static unsigned char *tmp_buf;
-
 extern struct console *console_drivers; /* from kernel/printk.c */
 
 /*
@@ -237,7 +235,8 @@ static int rs_write(struct tty_struct * tty,
 	int	c, ret = 0;
 	unsigned long flags;
 
-	if (!tty || !info->xmit.buf || !tmp_buf) return 0;
+	if (!tty || !info->xmit.buf)
+		return 0;
 
 	local_irq_save(flags);
 	while (1) {
@@ -618,7 +617,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
 {
 	struct serial_state *info = rs_table + tty->index;
 	int			retval;
-	unsigned long		page;
 
 	info->tport.count++;
 	info->tport.tty = tty;
@@ -630,16 +628,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
 #endif
 	tty->low_latency = (info->tport.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
-	if (!tmp_buf) {
-		page = get_zeroed_page(GFP_KERNEL);
-		if (!page)
-			return -ENOMEM;
-		if (tmp_buf)
-			free_page(page);
-		else
-			tmp_buf = (unsigned char *) page;
-	}
-
 	/*
 	 * If the port is the middle of closing, bail out now
 	 */
-- 
1.7.9.2
```
