Re: CVS commit: src/sys/arch/luna68k/dev
On Thu, Jan 02, 2014 at 01:25:56PM +0900, Izumi Tsutsui wrote: This could lead to problems in the future. I would put it back. How? - it was added by me recently - netbsd-6 doesn't have it - no other serial driver except com(4) has it ISTM that if the field exists, it should always be initialized (in all tty drivers); if it doesn't need to be initialized, it shouldn't exist... The tty code is a mess but someday someone will fix it up. -- David A. Holland dholl...@netbsd.org
Re: CVS commit: src/sys/arch/luna68k/dev
On Thu, Jan 02, 2014 at 11:11:34AM -0500, Christos Zoulas wrote: | ISTM that if the field exists, it should always be initialized (in all | tty drivers); if it doesn't need to be initialized, it shouldn't | exist... | | The tty code is a mess but someday someone will fix it up. grep -rw t_softc /usr/src/sys reveals: ./dev/ic/com.c: tp-t_softc = sc; ./sys/tty.h:void*t_softc; /* pointer to driver's softc. */ And the change was done a long time ago, and still nothing uses it. date: 2013-02-24 01:20:24 -0500; author: matt; state: Exp; lines: +2 -1; Add a t_softc member to struct tty in which a driver can store a pointer to its softc. (analogous to if_softc in struct ifnet). What's the plan? Dunno... Cc: added (my plan has been to invade with torches and pitchforks, but I've been putting off even looking at it while namei and vfs stuff remain a mess) -- David A. Holland dholl...@netbsd.org
Re: CVS commit: src/sys/arch/luna68k/dev
In article 20140102033235.cfeb...@cvs.netbsd.org, Izumi Tsutsui source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: src Committed By: tsutsui Date: Thu Jan 2 03:32:35 UTC 2014 Modified Files: src/sys/arch/luna68k/dev: siotty.c Log Message: Remove initialization of unused t_softc in struct tty (to make pullup easier). This could lead to problems in the future. I would put it back. christos
Re: CVS commit: src/sys/arch/luna68k/dev
On Jan 2, 1:25pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src/sys/arch/luna68k/dev | This could lead to problems in the future. I would put it back. | | - it was added by me recently | - netbsd-6 doesn't have it | - no other serial driver except com(4) has it I don't know, if nothing uses it, it is not needed, if things start using it, it should be initialized everywhere. christos
Re: CVS commit: src/sys/arch/luna68k/dev
christos@ wrote: On Jan 2, 1:25pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src/sys/arch/luna68k/dev | This could lead to problems in the future. I would put it back. | | - it was added by me recently | - netbsd-6 doesn't have it | - no other serial driver except com(4) has it I don't know, if nothing uses it, it is not needed, if things start using it, it should be initialized everywhere. Then you shouldn't put it back unless you know how it will be used. There was no explanation why it was needed in related commit logs, and if it's really necessary in all drivers it was an API change and should be announced properly. Anyway I don't see reason why it's necessary. All other tty drivers use device_lookup_private(9) with struct cfdriver and UNIT(tp-t_dev) to get softc in drivers. --- Izumi Tsutsui
Re: CVS commit: src/sys/arch/luna68k/dev
On Jan 2, 2:03pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src/sys/arch/luna68k/dev | Then you shouldn't put it back unless you know how it will be used. I am not putting it back. | There was no explanation why it was needed in related commit logs, | and if it's really necessary in all drivers it was an API change | and should be announced properly. I don't know either. Let's discuss in tech-kern. | Anyway I don't see reason why it's necessary. | All other tty drivers use device_lookup_private(9) with | struct cfdriver and UNIT(tp-t_dev) to get softc in drivers. OK fine then. christos