Re: [PATCH] vt: add an event interface

From: Ingo Molnar
Date: Fri Jul 03 2009 - 11:42:27 EST



* Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:

> > It's an argument you made on false premises.
> >
> > The thing is, my review wasnt about old code being moved around. It
> > was about new code being introduced by you:
>
> Ingo, if you've nothing better to do than quote out of context and
> be offensive, perhaps you should go fix voyager support or
> something productive instead.
>
> The reply section you are quoting was about the code that was
> moved from place to place. I stand by that comment - you don't
> move code from place to place and reformat, rework it in one go.
> It's lousy engineering.

Your claim is simply false on its face. This commit:

| commit a6614999e800cf3a134ce93ea46ef837e3c0e76e
| Author: Alan Cox <alan@xxxxxxxxxx>
| Date: Fri Jan 2 13:46:50 2009 +0000
|
| tty: Introduce some close helpers for ports

did not 'move' the piece of code i quoted around:

+ if( tty->count == 1 && port->count != 1) {
+ printk(KERN_WARNING
+ "tty_port_close_start: tty->count = 1 port count = %d.\n",
+ port->count);
+ port->count = 1;
+ }
+ if (--port->count < 0) {
+ printk(KERN_WARNING "tty_port_close_start: count = %d\n",
+ port->count);
+ port->count = 0;
+ }

it introduces it. This line:

+ if( tty->count == 1 && port->count != 1) {

can be found nowhere else in the commit. You added it.

In fact, if one looks closer, it turns out that:

$ git log -p -1 a6614999e800cf3a134ce93ea46ef837e3c0e76e | grep -iE 'if.*tty->count'
- if (tty->count == 1 && port->port.count != 1) {
- if (tty->count == 1 && port->count != 1)
- if ((tty->count == 1) && (info->port.count != 1)) {
- if ((tty->count == 1) && (port->port.count != 1)) {
- if (tty->count == 1 && port->count != 1)
- if ((tty->count == 1) && (info->port.count != 1)) {
- if ((tty->count == 1) && (info->port.count != 1)) {
- if ((tty->count == 1) && (info->port.count != 1)) {
+ if( tty->count == 1 && port->count != 1) {

that you consolidate 8 separate pieces of code, all of which got
this basic detail right, and you _introduced_ the uncleanliness.

Ingo
--
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/