All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Seidel <fseidel@suse.de>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC 8/13] Char: nozomi, tty cleanup
Date: Mon, 12 Nov 2007 19:43:08 +0100	[thread overview]
Message-ID: <200711121943.09612.fseidel@suse.de> (raw)
In-Reply-To: <15624318902788326176.slaby@pripojeni.net>

On Samstag 10 November 2007 00:48:11, you (Jiri Slaby) wrote:
> nozomi, tty cleanup
> - init and deinit tty driver at module load/unload. When the OS (user)
>   loads the driver the hardware usually is ready to driver.
> - merge (unify) MAX_PORT, NTTY_TTY_MINORS into NOZOMI_MAX_PORTS
> - remove struct nozomi_devices, it was used only as list entries

This one took a little bit longer to review and test in depth, but
i finally made it.
I really find this a really good rework, i did only a few little
very minor changes (see comments below).
Please take my comments with a big pinch of salt (as i really am very
passionate to become a kernel hacker but still lack too much knowledge
and experience in many areas).

> ...
> @@ -172,9 +172,6 @@ static int debug;
>  ...
> -#define NTTY_TTY_MINORS		MAX_PORT
> -#define NTTY_TTY_MAXMINORS	256
>  ...
> -#define MAX_PORT		4
> -#define NOZOMI_MAX_PORTS	5
> +#define NOZOMI_MAX_PORTS	4
> +#define NOZOMI_MAX_CARDS	(256 / NOZOMI_MAX_PORTS)
> +#define NOZOMI_MAX_MINORS	(NOZOMI_MAX_PORTS * NOZOMI_MAX_CARDS)

I don't see the benefit in indirectly defining the maxminors in maxcards
and count back then. Perhaps this is cleaner/better but i just don't
understand it (now). So, i just did a additional
#define NOZOMI_MAX_CARDS (NTTY_TTY_MAXMINORS / NTTY_TTY_MINORS)
which seamed more straightforward to me and didn't break anything (as the
change to NOZOMI_MAX_PORTS currently would).
But to at least merge it a bit i removed the NTTY_TTY_MINORS alias for
MAX_PORT (and of course replaced usages with MAX_PORT).

>  ...
> -		for (i = PORT_MDM; i < MAX_PORT; i++) {
> +		for (i = PORT_MDM; i < NOZOMI_MAX_PORTS; i++) {

Those changes e.g. aren't needed when just adding the one define as i
suggested above.
All other comments vanished after i studied them better :-)

I'll repost the complete patch in a few moments (in CC to Greg again).

Thanks so much for this,
Frank

  parent reply	other threads:[~2007-11-12 18:43 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 23:43 [RFC 1/13] Char: nozomi, remove unneded stuff Jiri Slaby
2007-11-09 23:44 ` [RFC 2/13] Char: nozomi, expand some functions Jiri Slaby
2007-11-10 15:41   ` Frank Seidel
2007-11-09 23:44 ` [RFC 3/13] Char: nozomi, fix fail paths Jiri Slaby
2007-11-10 15:41   ` Frank Seidel
2007-11-09 23:45 ` [RFC 4/13] Char: nozomi, tty index cleanup Jiri Slaby
2007-11-10 15:41   ` Frank Seidel
2007-11-10 15:50     ` Jiri Slaby
2007-11-09 23:46 ` [RFC 5/13] Char: nozomi, ioctls cleanup Jiri Slaby
2007-11-10 15:41   ` Frank Seidel
2007-11-09 23:46 ` [RFC 6/13] Char: nozomi, reorder and cleanup probe, remove Jiri Slaby
2007-11-10 15:42   ` Frank Seidel
2007-11-09 23:47 ` [RFC 7/13] Char: nozomi, remove struct irq Jiri Slaby
2007-11-10 15:42   ` Frank Seidel
2007-11-12 15:11   ` Frank Seidel
2007-11-09 23:48 ` [RFC 8/13] Char: nozomi, tty cleanup Jiri Slaby
2007-11-10 15:42   ` Frank Seidel
2007-11-12 18:43   ` Frank Seidel [this message]
2007-11-09 23:48 ` [RFC 9/13] Char: nozomi, lock cleanup Jiri Slaby
2007-11-10 15:42   ` Frank Seidel
2007-11-09 23:49 ` [RFC! 10/13] Char: nozomi, fix tty_flip_buffer_push Jiri Slaby
2007-11-10 15:43   ` Frank Seidel
2007-11-09 23:50 ` [RFC 11/13] Char: nozomi, remove unused includes Jiri Slaby
2007-11-10 15:43   ` Frank Seidel
2007-11-09 23:50 ` [RFC 12/13] Char: nozomi, remove void acc char2 char3 more mp mp.c mp.yy m1 nozomi2 proto rej slock1 casts Jiri Slaby
2007-11-10 15:43   ` Frank Seidel
2007-11-09 23:51 ` [RFC 13/13] Char: nozomi, cleanup read and write Jiri Slaby
2007-11-10 15:43   ` Frank Seidel
2007-11-10 16:15   ` Adrian Bunk
2007-11-10 22:04     ` Jiri Slaby
2007-11-11  2:37       ` Frank Seidel
2007-11-11 16:02         ` Frank Seidel
2007-11-12  7:54       ` Adrian Bunk
2007-11-12  9:43         ` Frank Seidel
2007-11-10 15:41 ` [RFC 1/13] Char: nozomi, remove unneded stuff Frank Seidel
2007-11-10 15:55   ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200711121943.09612.fseidel@suse.de \
    --to=fseidel@suse.de \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.