remove unused semaphore from arch/ia64/hp/sim/simserial.c
Subsystems (4)
PATCH 1/1 remove unused semaphore from arch/ia64/hp/sim/simserial.c
Remove unsued semaphore declaration.
----
arch/ia64/hp/sim/simserial.c | 1 - 1 files changed, 1 deletion(-)
Index: linux-2.6.15-rc7-quilt/arch/ia64/hp/sim/simserial.c =================================--- linux-2.6.15-rc7-quilt.orig/arch/ia64/hp/sim/simserial.c +++ linux-2.6.15-rc7-quilt/arch/ia64/hp/sim/simserial.c
@@ -107,7 +107,6 @@
static struct console *console;
static unsigned char *tmp_buf;
-static DECLARE_MUTEX(tmp_buf_sem);
extern struct console *console_drivers; /* from kernel/printk.c */
PATCH 1/1 remove unused tmp_buf_sem's
Quoted 14 lines · Jes Sorensen
Remove unsued semaphore declaration.
Signed-off-by Jes Sorensen <[email protected]>----
arch/ia64/hp/sim/simserial.c | 1 - 1 files changed, 1 deletion(-)Index:
linux-2.6.15-rc7-quilt/arch/ia64/hp/sim/simserial.c=================================> ---linux-2.6.15-rc7-quilt.orig/arch/ia64/hp/sim/simserial.c+++linux-2.6.15-rc7-quilt/arch/ia64/hp/sim/simserial.c
Review line 110
Quoted 5 lines
(quoted diff) +0
-1@@ -107,7 +107,6 @@ static struct console *console; static unsigned char *tmp_buf; -static DECLARE_MUTEX(tmp_buf_sem);
There are even more of them...
Patch below.
cu
Adrian
<-- snip -->
tmp_buf_sem sems to be a common name for something completely unused...
---
arch/ia64/hp/sim/simserial.c | 1 - arch/ppc/4xx_io/serial_sicc.c | 1 - drivers/char/amiserial.c | 1 - drivers/char/esp.c | 1 - drivers/char/generic_serial.c | 1 - drivers/char/riscom8.c | 1 - drivers/char/serial167.c | 1 - drivers/char/specialix.c | 3 --- drivers/char/synclink.c | 1 - drivers/sbus/char/aurora.c | 1 - drivers/serial/68328serial.c | 1 - drivers/usb/serial/pl2303.c | 2 -- 12 files changed, 15 deletions(-)
arch/ia64/hp/sim/simserial.c renamed from arch/ia64/hp/sim/simserial.c.old +0 -1
@@ -103,7 +103,6 @@static struct console *console;static unsigned char *tmp_buf; -static DECLARE_MUTEX (tmp_buf_sem);extern struct console *console_drivers;/* from kernel/printk.c */
arch/ppc/4xx_io/serial_sicc.c renamed from arch/ppc/4xx_io/serial_sicc.c.old +0 -1
@@ -215,7 +215,6 @@* memory if large numbers of serial ports are open. */ static u_char *tmp_buf; -static DECLARE_MUTEX (tmp_buf_sem);#define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8)
drivers/char/amiserial.c renamed from drivers/char/amiserial.c.old +0 -1
@@ -123,7 +123,6 @@* memory if large numbers of serial ports are open. */ static unsigned char *tmp_buf; -static DECLARE_MUTEX (tmp_buf_sem);#include <asm/uaccess.h>
drivers/char/esp.c renamed from drivers/char/esp.c.old +0 -1
@@ -160,7 +160,6 @@* memory if large numbers of serial ports are open. */ static unsigned char *tmp_buf; -static DECLARE_MUTEX (tmp_buf_sem);static inline int serial_paranoia_check (struct esp_struct *info,char *name,const char *routine)
drivers/char/generic_serial.c renamed from drivers/char/generic_serial.c.old +0 -1
@@ -34,7 +34,6 @@#define DEBUG static char * tmp_buf; -static DECLARE_MUTEX (tmp_buf_sem);static int gs_debug;
drivers/char/riscom8.c renamed from drivers/char/riscom8.c.old +0 -1
@@ -82,7 +82,6 @@static struct riscom_board * IRQ_to_board[16 ];static struct tty_driver *riscom_driver;static unsigned char * tmp_buf; -static DECLARE_MUTEX (tmp_buf_sem);static unsigned long baud_table[] = {0 ,50 ,75 ,110 ,134 ,150 ,200 ,300 ,600 ,1200 ,1800 ,2400 ,4800 ,
drivers/char/serial167.c renamed from drivers/char/serial167.c.old +0 -1
@@ -129,7 +129,6 @@* memory if large numbers of serial ports are open. */ static unsigned char *tmp_buf =0 ; -DECLARE_MUTEX (tmp_buf_sem);/* * This is used to look up the divisor speeds and the timeouts
drivers/char/specialix.c renamed from drivers/char/specialix.c.old +0 -3
@@ -184,7 +184,6 @@static struct tty_driver *specialix_driver;static unsigned char * tmp_buf; -static DECLARE_MUTEX (tmp_buf_sem);static unsigned long baud_table[] = {0 ,50 ,75 ,110 ,134 ,150 ,200 ,300 ,600 ,1200 ,1800 ,2400 ,4800 ,
@@ -2556,8 +2555,6 @@func_enter (); -init_MUTEX (&tmp_buf_sem);/* Init de the semaphore - pvdl */ -if (iobase[0 ] || iobase[1 ] || iobase[2 ] || iobase[3 ]) {for (i =0 ; i <SX_NBOARD ; i++) { sx_board[i].base = iobase[i];
drivers/char/synclink.c renamed from drivers/char/synclink.c.old +0 -1
@@ -951,7 +951,6 @@* memory if large numbers of serial ports are open. */ static unsigned char *tmp_buf; -static DECLARE_MUTEX (tmp_buf_sem);static inline int mgsl_paranoia_check (struct mgsl_struct *info,char *name,const char *routine)
drivers/sbus/char/aurora.c renamed from drivers/sbus/char/aurora.c.old +0 -1
@@ -92,7 +92,6 @@/* no longer used. static struct Aurora_board * IRQ_to_board[16] = { NULL, } ;*/ static unsigned char * tmp_buf =NULL ; -static DECLARE_MUTEX (tmp_buf_sem);DECLARE_TASK_QUEUE (tq_aurora);
drivers/serial/68328serial.c renamed from drivers/serial/68328serial.c.old +0 -1
@@ -141,7 +141,6 @@* memory if large numbers of serial ports are open. */ static unsigned char tmp_buf[SERIAL_XMIT_SIZE ];/* This is cheating */ -DECLARE_MUTEX (tmp_buf_sem);static inline int serial_paranoia_check (struct m68k_serial *info,char *name,const char *routine)
drivers/usb/serial/pl2303.c renamed from drivers/usb/serial/pl2303.c.old +0 -2
@@ -43,8 +43,6 @@#define PL2303_BUF_SIZE 1024#define PL2303_TMP_BUF_SIZE 1024 -static DECLARE_MUTEX (pl2303_tmp_buf_sem); -struct pl2303_buf {unsigned int buf_size;char *buf_buf;
Re: [2.6 patch] remove unused tmp_buf_sem's
Quoted 10 lines · Adrian Bunk
<-- snip -->
tmp_buf_semsems to be a common name for something completely unused...Signed-off-by Adrian Bunk <[email protected]>---
Quoted 13 lines
arch/ia64/hp/sim/simserial.c | 1 - arch/ppc/4xx_io/serial_sicc.c | 1 - drivers/char/amiserial.c | 1 - drivers/char/esp.c | 1 - drivers/char/generic_serial.c | 1 - drivers/char/riscom8.c | 1 - drivers/char/serial167.c | 1 - drivers/char/specialix.c | 3 --- drivers/char/synclink.c | 1 - drivers/sbus/char/aurora.c | 1 - drivers/serial/68328serial.c | 1 - drivers/usb/serial/pl2303.c | 2 -- 12 files changed, 15 deletions(-)
usb portion is:
Re: [linux-usb-devel] Re: [2.6 patch] remove unused tmp_buf_sem's
Quoted 5 lines · Greg KH
Quoted 4 lines · Adrian Bunk
<-- snip -->
tmp_buf_semsems to be a common name for something completely unused...
That would be correct. The old tty driver layer used to call ->write from both kernel and user contexts according to a flag. Drivers then all ended up with the same code copying it into a tmp buffer and using a locking semaphore.
Linus took out that code and arranged that ->write always got a kernel buffer so the remainders should indeed go.
Alan