Re: [PATCH 2/4] TTY: serial, remove dead code from 68328

From: Geert Uytterhoeven
Date: Wed Aug 31 2011 - 15:51:56 EST


On Wed, Aug 31, 2011 at 21:51, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> On Wed, Aug 31, 2011 at 21:24, Jiri Slaby <jslaby@xxxxxxx> wrote:
>> The code is dead at least since 2002. So remove it to not distort git
>> grep output (about port.tty usage).
>>
>> Remove the whole do_softirq tasklet as it's noop now.
>>
>> Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
>> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
>> Cc: Alan Cox <alan@xxxxxxxxxxxxxxx>
>> ---
>> Cc: linux-m68k@xxxxxxxxxxxxxxxxxxxx
>
> This is a uClinux driver.

So I really wanted to cc the uClinux list...

>> Âdrivers/tty/serial/68328serial.c | Â 35 -----------------------------------
>> Âdrivers/tty/serial/68328serial.h | Â Â1 -
>> Â2 files changed, 0 insertions(+), 36 deletions(-)
>>
>> diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
>> index e0a7754..f549231 100644
>> --- a/drivers/tty/serial/68328serial.c
>> +++ b/drivers/tty/serial/68328serial.c
>> @@ -235,22 +235,6 @@ static void batten_down_hatches(void)
>>
>> Âstatic void status_handle(struct m68k_serial *info, unsigned short status)
>> Â{
>> -#if 0
>> - Â Â Â if(status & DCD) {
>> - Â Â Â Â Â Â Â if((info->port.tty->termios->c_cflag & CRTSCTS) &&
>> - Â Â Â Â Â Â Â Â Â((info->curregs[3] & AUTO_ENAB)==0)) {
>> - Â Â Â Â Â Â Â Â Â Â Â info->curregs[3] |= AUTO_ENAB;
>> - Â Â Â Â Â Â Â Â Â Â Â info->pendregs[3] |= AUTO_ENAB;
>> - Â Â Â Â Â Â Â Â Â Â Â write_zsreg(info->m68k_channel, 3, info->curregs[3]);
>> - Â Â Â Â Â Â Â }
>> - Â Â Â } else {
>> - Â Â Â Â Â Â Â if((info->curregs[3] & AUTO_ENAB)) {
>> - Â Â Â Â Â Â Â Â Â Â Â info->curregs[3] &= ~AUTO_ENAB;
>> - Â Â Â Â Â Â Â Â Â Â Â info->pendregs[3] &= ~AUTO_ENAB;
>> - Â Â Â Â Â Â Â Â Â Â Â write_zsreg(info->m68k_channel, 3, info->curregs[3]);
>> - Â Â Â Â Â Â Â }
>> - Â Â Â }
>> -#endif
>> Â Â Â Â/* If this is console input and this is a
>> Â Â Â Â * 'break asserted' status change interrupt
>> Â Â Â Â * see if we can drop into the debugger
>> @@ -340,9 +324,6 @@ static void transmit_chars(struct m68k_serial *info)
>> Â Â Â Âinfo->xmit_tail = info->xmit_tail & (SERIAL_XMIT_SIZE-1);
>> Â Â Â Âinfo->xmit_cnt--;
>>
>> - Â Â Â if (info->xmit_cnt < WAKEUP_CHARS)
>> - Â Â Â Â Â Â Â schedule_work(&info->tqueue);
>> -
>> Â Â Â Âif(info->xmit_cnt <= 0) {
>> Â Â Â Â Â Â Â Â/* All done for now... TX ints off */
>> Â Â Â Â Â Â Â Âuart->ustcnt &= ~USTCNT_TX_INTR_MASK;
>> @@ -378,21 +359,6 @@ irqreturn_t rs_interrupt(int irq, void *dev_id)
>> Â Â Â Âreturn IRQ_HANDLED;
>> Â}
>>
>> -static void do_softint(struct work_struct *work)
>> -{
>> -    struct m68k_serial   Â*info = container_of(work, struct m68k_serial, tqueue);
>> -    struct tty_struct    *tty;
>> -
>> - Â Â Â tty = info->tty;
>> - Â Â Â if (!tty)
>> - Â Â Â Â Â Â Â return;
>> -#if 0
>> - Â Â Â if (clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
>> - Â Â Â Â Â Â Â tty_wakeup(tty);
>> - Â Â Â }
>> -#endif
>> -}
>> -
>> Âstatic int startup(struct m68k_serial * info)
>> Â{
>> Â Â Â Âm68328_uart *uart = &uart_addr[info->line];
>> @@ -1324,7 +1290,6 @@ rs68328_init(void)
>> Â Â Â Â Â Âinfo->event = 0;
>> Â Â Â Â Â Âinfo->count = 0;
>> Â Â Â Â Â Âinfo->blocked_open = 0;
>> - Â Â Â Â Â INIT_WORK(&info->tqueue, do_softint);
>> Â Â Â Â Â Âinit_waitqueue_head(&info->open_wait);
>> Â Â Â Â Â Âinit_waitqueue_head(&info->close_wait);
>> Â Â Â Â Â Âinfo->line = i;
>> diff --git a/drivers/tty/serial/68328serial.h b/drivers/tty/serial/68328serial.h
>> index 8c9c3c0..3d2faab 100644
>> --- a/drivers/tty/serial/68328serial.h
>> +++ b/drivers/tty/serial/68328serial.h
>> @@ -158,7 +158,6 @@ struct m68k_serial {
>>    Âint           xmit_head;
>>    Âint           xmit_tail;
>>    Âint           xmit_cnt;
>> -    struct work_struct   Âtqueue;
>>    Âwait_queue_head_t    open_wait;
>>    Âwait_queue_head_t    close_wait;
>> Â};
>> --
>> 1.7.6.1

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/