Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 12 Feb 2003 13:43:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 12 Feb 2003 13:43:14 -0500 Received: from thunk.org ([140.239.227.29]:7833 "EHLO thunker.thunk.org") by vger.kernel.org with ESMTP id ; Wed, 12 Feb 2003 13:43:13 -0500 Date: Wed, 12 Feb 2003 13:52:52 -0500 From: "Theodore Ts'o" To: Andries.Brouwer@cwi.nl Cc: linux-kernel@vger.kernel.org Subject: Re: struct tty_driver Message-ID: <20030212185252.GA16353@think.thunk.org> Mail-Followup-To: Theodore Ts'o , Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 995 Lines: 31 On Tue, Feb 11, 2003 at 03:44:07PM +0100, Andries.Brouwer@cwi.nl wrote: > Ted, I wondered: > > Looking at 2.5.60 I see > > struct tty_struct { > int magic; > struct tty_driver driver; > ... > > and it looks like this struct tty_driver is never modified. > Since it is rather large, why not replace it by > struct tty_driver *driver; > ? > > As it is now, the initialization in init_dev() does > tty->driver = *driver; > just duplicating constant data. > > Is this a historical relict, or does this duplication have a function? Nope. The tty->ldisc should also be made into a pointer as well. It's a historic relict; it's been a very, very long time since there's been any variable data in the driver or ldisc structures. - Ted - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/