Re: [PATCH] New user space serial port driver

Tigran Aivazian
2000-11-30T08:51:14Z

On Thu, 30 Nov 2000, Patrick van de Lageweg wrote:
> +static struct tty_struct * ussp_table[USSP_MAX_PORTS] = { NULL, };

this wastes at least 4 * USSP_MAX_PORTS bytes in the kernel image.
Typically around 64 bytes but could be more. For more info see the recent
silly flamewars on the list. The correct way is not to initialize the data
to zero explicitly as BSS is cleared automatically on boot. It is also
probably documented in the lkml FAQ at the bottom of this message.

Also, it makes your code look consistent as, e.g. in cases below you do
the right thing:

> +static struct termios * ussp_termios[USSP_MAX_PORTS];
> +static struct termios * ussp_termios_locked[USSP_MAX_PORTS];

Regards,
Tigran