Re: [PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-23 Thread Maciej W. Rozycki
On Wed, 17 Oct 2007, Roel Kluin wrote: > if (oclose >= abs(obaud - baud_table[i])) { > > should work as well Hmm, I am not sure if it is clearer or produces better code, but send a patch -- I will not object. Maciej - To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-23 Thread Maciej W. Rozycki
On Wed, 17 Oct 2007, Alan Cox wrote: > > The tty_termios_encode_baud_rate() function as defined by tty_ioctl.c has > > a problem with the baud_table within. The comparison operators are > > reversed and as a result this table's entries never match and BOTHER is > > always used. > > Oops. I

Re: [PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-23 Thread Maciej W. Rozycki
On Wed, 17 Oct 2007, Alan Cox wrote: The tty_termios_encode_baud_rate() function as defined by tty_ioctl.c has a problem with the baud_table within. The comparison operators are reversed and as a result this table's entries never match and BOTHER is always used. Oops. I thought

Re: [PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-23 Thread Maciej W. Rozycki
On Wed, 17 Oct 2007, Roel Kluin wrote: if (oclose = abs(obaud - baud_table[i])) { should work as well Hmm, I am not sure if it is clearer or produces better code, but send a patch -- I will not object. Maciej - To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-17 Thread Alan Cox
On Tue, 16 Oct 2007 19:12:11 +0100 (BST) "Maciej W. Rozycki" <[EMAIL PROTECTED]> wrote: > The tty_termios_encode_baud_rate() function as defined by tty_ioctl.c has > a problem with the baud_table within. The comparison operators are > reversed and as a result this table's entries never match

Re: [PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-17 Thread Alan Cox
On Tue, 16 Oct 2007 19:12:11 +0100 (BST) Maciej W. Rozycki [EMAIL PROTECTED] wrote: The tty_termios_encode_baud_rate() function as defined by tty_ioctl.c has a problem with the baud_table within. The comparison operators are reversed and as a result this table's entries never match and

Re: [PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-16 Thread Roel Kluin
Since you were sending a fix, possibly I shouldn't comment on this. If so please disregard my suggestion for a trivial cleanup. Roel Maciej W. Rozycki wrote: > +void tty_termios_encode_baud_rate(struct ktermios *termios, > + speed_t ibaud, speed_t obaud) > { >

[PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-16 Thread Maciej W. Rozycki
The tty_termios_encode_baud_rate() function as defined by tty_ioctl.c has a problem with the baud_table within. The comparison operators are reversed and as a result this table's entries never match and BOTHER is always used. Additionally this function's prototype is not exported unlike the

[PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-16 Thread Maciej W. Rozycki
The tty_termios_encode_baud_rate() function as defined by tty_ioctl.c has a problem with the baud_table within. The comparison operators are reversed and as a result this table's entries never match and BOTHER is always used. Additionally this function's prototype is not exported unlike the

Re: [PATCH] tty_ioctl: Fix the baud_table check in encode_baud_rate

2007-10-16 Thread Roel Kluin
Since you were sending a fix, possibly I shouldn't comment on this. If so please disregard my suggestion for a trivial cleanup. Roel Maciej W. Rozycki wrote: +void tty_termios_encode_baud_rate(struct ktermios *termios, + speed_t ibaud, speed_t obaud) {