tty/serial termbits cleanups
Subsystems (9)
cover tty/serial termbits cleanups
A few simple cleanups that I've come across while playing with the termbits.
Ilpo Järvinen (5):
tty/termbits: remove #ifdef CMSPAR that is always defined tty/termbits: remove #ifdef BOTHER that is always defined tty/termbits: remove #ifdef IBSHIFT that is always defined
serial: fsl_lpuart: Remove unnecessary clearing for CRTSCTS
serial: jsm: Use B0 instead of 0
drivers/char/pcmcia/synclink_cs.c | 2 -- drivers/tty/amiserial.c | 2 -- drivers/tty/mxser.c | 2 -- drivers/tty/serial/8250/8250_port.c | 2 -- drivers/tty/serial/fsl_lpuart.c | 8 +++----- drivers/tty/serial/jsm/jsm_cls.c | 8 +------- drivers/tty/serial/jsm/jsm_neo.c | 8 +------- drivers/tty/serial/sunsu.c | 2 -- drivers/tty/tty_baudrate.c | 31 ++++++----------------------- drivers/tty/tty_ioctl.c | 2 -- drivers/usb/class/cdc-acm.h | 8 -------- drivers/usb/serial/ark3116.c | 3 +-- drivers/usb/serial/whiteheat.c | 4 ---- 13 files changed, 12 insertions(+), 70 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/5 tty/termbits: remove #ifdef CMSPAR that is always defined
CMSPAR is defined by all architectures.
--- drivers/char/pcmcia/synclink_cs.c | 2 -- drivers/tty/amiserial.c | 2 -- drivers/tty/serial/8250/8250_port.c | 2 -- drivers/tty/serial/jsm/jsm_cls.c | 6 ------ drivers/tty/serial/jsm/jsm_neo.c | 6 ------ drivers/tty/serial/sunsu.c | 2 -- drivers/usb/class/cdc-acm.h | 8 -------- drivers/usb/serial/ark3116.c | 3 +-- drivers/usb/serial/whiteheat.c | 4 ---- 9 files changed, 1 insertion(+), 34 deletions(-)
drivers/char/pcmcia/synclink_cs.c +0 -2
@@ -1432,10 +1432,8 @@ static void mgslpc_change_params(MGSLPC_INFO *info, struct tty_struct *tty) info->params.parity =ASYNC_PARITY_ODD ; else info->params.parity = ASYNC_PARITY_EVEN; -#ifdef CMSPAR if (cflag &CMSPAR ) info->params.parity =ASYNC_PARITY_SPACE ; -#endif }/* calculate number of jiffies to transmit a full
drivers/tty/amiserial.c +0 -2
@@ -588,10 +588,8 @@ static void change_speed(struct tty_struct *tty, struct serial_state *info, }if (!(cflag &PARODD )) cval |=UART_LCR_EPAR ; -#ifdef CMSPAR if (cflag &CMSPAR ) cval |=UART_LCR_SPAR ; -#endif /* Determine divisor based on baud rate */ baud =tty_get_baud_rate (tty);
drivers/tty/serial/8250/8250_port.c +0 -2
@@ -2620,10 +2620,8 @@ static unsigned char serial8250_compute_lcr(struct uart_8250_port *up, }if (!(c_cflag &PARODD )) cval |=UART_LCR_EPAR ; -#ifdef CMSPAR if (c_cflag &CMSPAR ) cval |=UART_LCR_SPAR ; -#endif return cval; }
drivers/tty/serial/jsm/jsm_cls.c +0 -6
@@ -723,14 +723,8 @@ static void cls_param(struct jsm_channel *ch)if (!(ch->ch_c_cflag &PARODD )) lcr |=UART_LCR_EPAR ; -/* -* Not all platforms support mark/space parity, -* so this will hide behind an ifdef. -*/ -#ifdef CMSPAR if (ch->ch_c_cflag &CMSPAR ) lcr |=UART_LCR_SPAR ; -#endif if (ch->ch_c_cflag &CSTOPB ) lcr |=UART_LCR_STOP ;
drivers/tty/serial/jsm/jsm_neo.c +0 -6
@@ -997,14 +997,8 @@ static void neo_param(struct jsm_channel *ch)if (!(ch->ch_c_cflag &PARODD )) lcr |=UART_LCR_EPAR ; -/* -* Not all platforms support mark/space parity, -* so this will hide behind an ifdef. -*/ -#ifdef CMSPAR if (ch->ch_c_cflag &CMSPAR ) lcr |=UART_LCR_SPAR ; -#endif if (ch->ch_c_cflag &CSTOPB ) lcr |=UART_LCR_STOP ;
drivers/tty/serial/sunsu.c +0 -2
@@ -798,10 +798,8 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag, cval |=UART_LCR_PARITY ;if (!(cflag &PARODD )) cval |=UART_LCR_EPAR ; -#ifdef CMSPAR if (cflag &CMSPAR ) cval |=UART_LCR_SPAR ; -#endif /* * Work around a bug in the Oxford Semiconductor 952 rev B
drivers/usb/class/cdc-acm.h +0 -8
@@ -7,14 +7,6 @@* */ -/* -* CMSPAR, some architectures can't have space and mark parity. -*/ - -#ifndef CMSPAR -#define CMSPAR 0 -#endif -/* * Major and minor numbers. */
drivers/usb/serial/ark3116.c +1 -2
@@ -208,10 +208,9 @@ static void ark3116_set_termios(struct tty_struct *tty, lcr |=UART_LCR_PARITY ;if (!(cflag &PARODD )) lcr |=UART_LCR_EPAR ; -#ifdef CMSPAR if (cflag &CMSPAR ) lcr |=UART_LCR_SPAR ; -#endif +/* handshake control */ hcr = (cflag &CRTSCTS ) ?0x03 :0x00 ;
drivers/usb/serial/whiteheat.c +0 -4
@@ -30,10 +30,6 @@#include <linux/usb/ezusb.h> #include "whiteheat.h" /* WhiteHEAT specific commands */ -#ifndef CMSPAR -#define CMSPAR 0 -#endif -/* * Version Information */
Signature · 1 line
2.30.2
PATCH 2/5 tty/termbits: remove #ifdef BOTHER that is always defined
In reply to Ilpo JärvinenBOTHER is defined by all architectures.
--- drivers/tty/mxser.c | 2 -- drivers/tty/tty_baudrate.c | 20 +++++--------------- drivers/tty/tty_ioctl.c | 2 -- 3 files changed, 5 insertions(+), 19 deletions(-)
drivers/tty/mxser.c +0 -2
@@ -528,7 +528,6 @@ static int mxser_set_baud(struct tty_struct *tty, speed_t newspd)outb (quot >>8 , info->ioaddr +UART_DLM );/* MS of divisor */ outb (cval, info->ioaddr +UART_LCR );/* reset DLAB */ -#ifdef BOTHER if (C_BAUD (tty) ==BOTHER ) { quot =MXSER_BAUD_BASE % newspd; quot *=8 ;
@@ -540,7 +539,6 @@ static int mxser_set_baud(struct tty_struct *tty, speed_t newspd)mxser_set_must_enum_value (info->ioaddr, quot); }else -#endif mxser_set_must_enum_value (info->ioaddr,0 );return 0 ;
drivers/tty/tty_baudrate.c +5 -15
@@ -61,11 +61,10 @@ speed_t tty_termios_baud_rate(struct ktermios *termios) cbaud = termios->c_cflag &CBAUD ; -#ifdef BOTHER /* Magic token for arbitrary speed via c_ispeed/c_ospeed */ if (cbaud ==BOTHER )return termios->c_ospeed; -#endif +if (cbaud &CBAUDEX ) { cbaud &= ~CBAUDEX ;
@@ -97,11 +96,11 @@ speed_t tty_termios_input_baud_rate(struct ktermios *termios)if (cbaud ==B0 )return tty_termios_baud_rate (termios); -#ifdef BOTHER +/* Magic token for arbitrary speed via c_ispeed*/ if (cbaud ==BOTHER )return termios->c_ispeed; -#endif +if (cbaud &CBAUDEX ) { cbaud &= ~CBAUDEX ;
@@ -157,7 +156,6 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,if (((termios->c_cflag >>IBSHIFT ) &CBAUD ) !=B0 ) ibinput =1 ;/* An input speed was specified */ #endif -#ifdef BOTHER /* If the user asked for a precise weird speed give a precise weird * answer. If they asked for a Bfoo speed they may have problems * digesting non-exact replies so fuzz a bit.
@@ -170,7 +168,7 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, }if (((termios->c_cflag >>IBSHIFT ) &CBAUD ) ==BOTHER ) iclose =0 ; -#endif + termios->c_cflag &= ~CBAUD ;#ifdef IBSHIFT termios->c_cflag &= ~(CBAUD <<IBSHIFT );
@@ -205,11 +203,7 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, } }while (++i < n_baud_table); -/* -* If we found no match then use BOTHER if provided or warn -* the user their platform maintainer needs to wake up if not. -*/ -#ifdef BOTHER +/* If we found no match then use BOTHER. */ if (ofound ==-1 ) termios->c_cflag |=BOTHER ;/* Set exact input bits only if the input and output differ or the
@@ -217,10 +211,6 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,*/ if (ifound ==-1 && (ibaud != obaud || ibinput)) termios->c_cflag |= (BOTHER <<IBSHIFT ); -#else -if (ifound ==-1 || ofound ==-1 ) -pr_warn_once ("tty: Unable to return correct speed data as your architecture needs updating.\n" ); -#endif }EXPORT_SYMBOL_GPL (tty_termios_encode_baud_rate);
drivers/tty/tty_ioctl.c +0 -2
@@ -562,10 +562,8 @@ static int set_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb) termios.c_cc[VKILL ] = tmp.sg_kill;set_sgflags (&termios, tmp.sg_flags);/* Try and encode into Bfoo format */ -#ifdef BOTHER tty_termios_encode_baud_rate (&termios, termios.c_ispeed, termios.c_ospeed); -#endif up_write (&tty->termios_rwsem);tty_set_termios (tty, &termios);return 0 ;
Signature · 1 line
2.30.2
PATCH 4/5 serial: fsl_lpuart: Remove unnecessary clearing for CRTSCTS
In reply to Ilpo Järvinenif (termios->c_cflag & CRTSCTS) guarantees that CRTSCTS is not ever set in the else block so clearing it is unnecessary.
While at it, remove also one pair of extra parenthesis.
--- drivers/tty/serial/fsl_lpuart.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/tty/serial/fsl_lpuart.c +3 -5
@@ -2110,12 +2110,10 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,if (sport->port.rs485.flags &SER_RS485_ENABLED ) termios->c_cflag &= ~CRTSCTS ; -if (termios->c_cflag &CRTSCTS ) { - modem |= (UARTMODIR_RXRTSE |UARTMODIR_TXCTSE ); - }else { - termios->c_cflag &= ~CRTSCTS ; +if (termios->c_cflag &CRTSCTS ) + modem |=UARTMODIR_RXRTSE |UARTMODIR_TXCTSE ; +else modem &= ~(UARTMODIR_RXRTSE |UARTMODIR_TXCTSE ); - }if (termios->c_cflag &CSTOPB ) bd |=UARTBAUD_SBNS ;
Signature · 1 line
2.30.2
PATCH 5/5 serial: jsm: Use B0 instead of 0
In reply to Ilpo JärvinenUse B0 to check zero baudrate rather than literal 0.
--- drivers/tty/serial/jsm/jsm_cls.c | 2 +- drivers/tty/serial/jsm/jsm_neo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/jsm/jsm_cls.c +1 -1
@@ -689,7 +689,7 @@ static void cls_param(struct jsm_channel *ch)/* * If baud rate is zero, flush queues, and set mval to drop DTR. */ -if ((ch->ch_c_cflag & (CBAUD )) ==0 ) { +if ((ch->ch_c_cflag & (CBAUD )) ==B0 ) { ch->ch_r_head =0 ; ch->ch_r_tail =0 ; ch->ch_e_head =0 ;
drivers/tty/serial/jsm/jsm_neo.c +1 -1
@@ -938,7 +938,7 @@ static void neo_param(struct jsm_channel *ch)/* * If baud rate is zero, flush queues, and set mval to drop DTR. */ -if ((ch->ch_c_cflag & (CBAUD )) ==0 ) { +if ((ch->ch_c_cflag & (CBAUD )) ==B0 ) { ch->ch_r_head = ch->ch_r_tail =0 ; ch->ch_e_head = ch->ch_e_tail =0 ;
Signature · 1 line
2.30.2
PATCH 3/5 tty/termbits: remove #ifdef IBSHIFT that is always defined
In reply to Ilpo JärvinenIBSHIFT is defined by all architectures.
--- drivers/tty/tty_baudrate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/tty/tty_baudrate.c +1 -10
@@ -91,7 +91,6 @@ EXPORT_SYMBOL(tty_termios_baud_rate);speed_t tty_termios_input_baud_rate (struct ktermios *termios) { -#ifdef IBSHIFT unsigned int cbaud = (termios->c_cflag >>IBSHIFT ) &CBAUD ;if (cbaud ==B0 )
@@ -110,9 +109,6 @@ speed_t tty_termios_input_baud_rate(struct ktermios *termios) cbaud +=15 ; }return cbaud >= n_baud_table ?0 : baud_table[cbaud]; -#else /* IBSHIFT */ -return tty_termios_baud_rate (termios); -#endif /* IBSHIFT */ }EXPORT_SYMBOL (tty_termios_input_baud_rate);
@@ -152,10 +148,9 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, termios->c_ispeed = ibaud; termios->c_ospeed = obaud; -#ifdef IBSHIFT if (((termios->c_cflag >>IBSHIFT ) &CBAUD ) !=B0 ) ibinput =1 ;/* An input speed was specified */ -#endif +/* If the user asked for a precise weird speed give a precise weird * answer. If they asked for a Bfoo speed they may have problems * digesting non-exact replies so fuzz a bit.
@@ -170,9 +165,7 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, iclose =0 ; termios->c_cflag &= ~CBAUD ; -#ifdef IBSHIFT termios->c_cflag &= ~(CBAUD <<IBSHIFT ); -#endif /* * Our goal is to find a close match to the standard baud rate
@@ -194,12 +187,10 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,*/ if (ofound == i && !ibinput) ifound = i; -#ifdef IBSHIFT else { ifound = i; termios->c_cflag |= (baud_bits[i] <<IBSHIFT ); } -#endif } }while (++i < n_baud_table);
Signature · 1 line
2.30.2
Re: [PATCH 1/5] tty/termbits: remove #ifdef CMSPAR that is always defined
In reply to Ilpo JärvinenQuoted 1 line · Ilpo Järvinen
CMSPAR is defined by all architectures.
For the sake of reviewers please say something about when this changed.
Also no need to be so verbose in your Subjects
tty: remove CMSPAR ifdefs
works just fine and is more in line with the prefix typically used for this subsystem.
Quoted 12 lines
Signed-off-by Ilpo Järvinen <[email protected]>--- drivers/char/pcmcia/synclink_cs.c | 2 -- drivers/tty/amiserial.c | 2 -- drivers/tty/serial/8250/8250_port.c | 2 -- drivers/tty/serial/jsm/jsm_cls.c | 6 ------ drivers/tty/serial/jsm/jsm_neo.c | 6 ------ drivers/tty/serial/sunsu.c | 2 -- drivers/usb/class/cdc-acm.h | 8 -------- drivers/usb/serial/ark3116.c | 3 +-- drivers/usb/serial/whiteheat.c | 4 ---- 9 files changed, 1 insertion(+), 34 deletions(-)
The change itself looks good otherwise.
Quoted 138 lines
drivers/char/pcmcia/synclink_cs.c +0
-2@@ -1432,10 +1432,8 @@ static void mgslpc_change_params(MGSLPC_INFO *info, struct tty_struct *tty) info->params.parity =ASYNC_PARITY_ODD ; else info->params.parity = ASYNC_PARITY_EVEN; -#ifdef CMSPAR if (cflag &CMSPAR ) info->params.parity =ASYNC_PARITY_SPACE ; -#endif }/* calculate number of jiffies to transmit a full drivers/tty/amiserial.c +0
-2@@ -588,10 +588,8 @@ static void change_speed(struct tty_struct *tty, struct serial_state *info, }if (!(cflag &PARODD )) cval |=UART_LCR_EPAR ; -#ifdef CMSPAR if (cflag &CMSPAR ) cval |=UART_LCR_SPAR ; -#endif /* Determine divisor based on baud rate */ baud =tty_get_baud_rate (tty);drivers/tty/serial/8250/8250_port.c +0
-2@@ -2620,10 +2620,8 @@ static unsigned char serial8250_compute_lcr(struct uart_8250_port *up, }if (!(c_cflag &PARODD )) cval |=UART_LCR_EPAR ; -#ifdef CMSPAR if (c_cflag &CMSPAR ) cval |=UART_LCR_SPAR ; -#endif return cval; }drivers/tty/serial/jsm/jsm_cls.c +0
-6@@ -723,14 +723,8 @@ static void cls_param(struct jsm_channel *ch)if (!(ch->ch_c_cflag &PARODD )) lcr |=UART_LCR_EPAR ; -/* -* Not all platforms support mark/space parity, -* so this will hide behind an ifdef. -*/ -#ifdef CMSPAR if (ch->ch_c_cflag &CMSPAR ) lcr |=UART_LCR_SPAR ; -#endif if (ch->ch_c_cflag &CSTOPB ) lcr |=UART_LCR_STOP ;drivers/tty/serial/jsm/jsm_neo.c +0
-6@@ -997,14 +997,8 @@ static void neo_param(struct jsm_channel *ch)if (!(ch->ch_c_cflag &PARODD )) lcr |=UART_LCR_EPAR ; -/* -* Not all platforms support mark/space parity, -* so this will hide behind an ifdef. -*/ -#ifdef CMSPAR if (ch->ch_c_cflag &CMSPAR ) lcr |=UART_LCR_SPAR ; -#endif if (ch->ch_c_cflag &CSTOPB ) lcr |=UART_LCR_STOP ;drivers/tty/serial/sunsu.c +0
-2@@ -798,10 +798,8 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag, cval |=UART_LCR_PARITY ;if (!(cflag &PARODD )) cval |=UART_LCR_EPAR ; -#ifdef CMSPAR if (cflag &CMSPAR ) cval |=UART_LCR_SPAR ; -#endif /* * Work around a bug in the Oxford Semiconductor 952 rev B drivers/usb/class/cdc-acm.h +0
-8@@ -7,14 +7,6 @@* */ -/* -* CMSPAR, some architectures can't have space and mark parity. -*/ - -#ifndef CMSPAR -#define CMSPAR 0 -#endif -/* * Major and minor numbers. */ drivers/usb/serial/ark3116.c +1
-2@@ -208,10 +208,9 @@ static void ark3116_set_termios(struct tty_struct *tty, lcr |=UART_LCR_PARITY ;if (!(cflag &PARODD )) lcr |=UART_LCR_EPAR ; -#ifdef CMSPAR if (cflag &CMSPAR ) lcr |=UART_LCR_SPAR ; -#endif +/* handshake control */ hcr = (cflag &CRTSCTS ) ?0x03 :0x00 ;drivers/usb/serial/whiteheat.c +0
-0
drivers/usb/serial/whiteheat.c line 35
Quoted 10 lines
drivers/usb/serial/whiteheat.c +0
-4@@ -30,10 +30,6 @@#include <linux/usb/ezusb.h> #include "whiteheat.h" /* WhiteHEAT specific commands */ -#ifndef CMSPAR -#define CMSPAR 0 -#endif -/* * Version Information */
Johan
Johan Hovold
maintainerRe: [PATCH 2/5] tty/termbits: remove #ifdef BOTHER that is always defined
In reply to Ilpo JärvinenQuoted 1 line · Ilpo Järvinen
BOTHER is defined by all architectures.
This changed quite recently so please mention the commit in question.
No need for the verbose Subject here either.
Quoted 20 lines
Signed-off-by Ilpo Järvinen <[email protected]>--- drivers/tty/mxser.c | 2 -- drivers/tty/tty_baudrate.c | 20 +++++--------------- drivers/tty/tty_ioctl.c | 2 -- 3 files changed, 5 insertions(+), 19 deletions(-)drivers/tty/mxser.c +0
-1@@ -528,7 +528,6 @@ static int mxser_set_baud(struct tty_struct *tty, speed_t newspd)outb (quot >>8 , info->ioaddr +UART_DLM );/* MS of divisor */ outb (cval, info->ioaddr +UART_LCR );/* reset DLAB */ -#ifdef BOTHER if (C_BAUD (tty) ==BOTHER ) { quot =MXSER_BAUD_BASE % newspd; quot *=8 ;
drivers/tty/mxser.c static int mxser_set_baud(struct tty_struct *tty, speed_t newspd) · line 542
Quoted 5 lines
drivers/tty/mxser.c +0
-1@@ -540,7 +539,6 @@ static int mxser_set_baud(struct tty_struct *tty, speed_t newspd)mxser_set_must_enum_value (info->ioaddr, quot); }else -#endif mxser_set_must_enum_value (info->ioaddr,0 );
When removing the ifdef, please add the missing bracket to the else branch as per the coding standard.
Johan
Johan Hovold
maintainerRe: [PATCH 3/5] tty/termbits: remove #ifdef IBSHIFT that is always defined
In reply to Ilpo JärvinenQuoted 1 line · Ilpo Järvinen
IBSHIFT is defined by all architectures.
This also changed recently so mention the commit in question.
Subject is overly verbose here too.
Quoted 11 lines
Signed-off-by Ilpo Järvinen <[email protected]>--- drivers/tty/tty_baudrate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)drivers/tty/tty_baudrate.c +0
-0
drivers/tty/tty_baudrate.c void tty_termios_encode_baud_rate(struct ktermios *termios, · line 202
Quoted 9 lines
drivers/tty/tty_baudrate.c +0
-2@@ -194,12 +187,10 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,*/ if (ofound == i && !ibinput) ifound = i; -#ifdef IBSHIFT else { ifound = i; termios->c_cflag |= (baud_bits[i] <<IBSHIFT ); } -#endif
Please add the missing brackets to the if branch when removing the ifdef.
Johan
Re: [PATCH 4/5] serial: fsl_lpuart: Remove unnecessary clearing for CRTSCTS
In reply to Ilpo JärvinenQuoted 6 lines · Ilpo Järvinen
if (
termios->c_cflag& CRTSCTS) guarantees that CRTSCTS is not ever set in the else block so clearing it is unnecessary.While at it, remove also one pair of extra parenthesis.
Signed-off-by Ilpo Järvinen <[email protected]>
Johan Hovold
maintainerRe: [PATCH 5/5] serial: jsm: Use B0 instead of 0
In reply to Ilpo JärvinenQuoted 13 lines · Ilpo Järvinen
Use B0 to check zero baudrate rather than literal 0.
Signed-off-by Ilpo Järvinen <[email protected]>--- drivers/tty/serial/jsm/jsm_cls.c | 2 +- drivers/tty/serial/jsm/jsm_neo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/tty/serial/jsm/jsm_cls.c +0
-0
drivers/tty/serial/jsm/jsm_cls.c static void cls_param(struct jsm_channel *ch) · line 692
Quoted 5 lines
drivers/tty/serial/jsm/jsm_cls.c +1
-1@@ -689,7 +689,7 @@ static void cls_param(struct jsm_channel *ch)/* * If baud rate is zero, flush queues, and set mval to drop DTR. */ -if ((ch->ch_c_cflag & (CBAUD )) ==0 ) { +if ((ch->ch_c_cflag & (CBAUD )) ==B0 ) {
Sure, why not. How about dropping the unnecessary parenthesis around CBAUD while at it?
Johan