Re: [PATCH 15/68] TTY: ipwireless, fix tty->index handling

From: Jiri Kosina
Date: Mon Mar 05 2012 - 09:03:30 EST


On Mon, 5 Mar 2012, Jiri Slaby wrote:

> * do not test if tty->index is in bounds. It is always.
> * tty->index is not a minor! Fix that.
>
> >From now on, let's assume that the parameter of the function is tty
> index with base being zero. This makes also the code more readable.
>
> Factually, there is no real change as tty_driver->minor_start is zero,
> so the tests are equivalent. But it did not make sense. And if this
> had changed eventually, it would have caused troubles.
>
> Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
> Cc: Jiri Kosina <jkosina@xxxxxxx>
> Cc: David Sterba <dsterba@xxxxxxx>

Acked-by: Jiri Kosina <jkosina@xxxxxxx>

Thanks Jiri.

--
Jiri Kosina
SUSE Labs
--
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/