Subject: Re: com rumblings...
To: Garrett D'Amore <email@example.com>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 06/16/2006 09:21:01
On Jun 16, 2006, at 9:17 AM, Garrett D'Amore wrote:
> I'm trying to understand what you mean by this comment;
> particularly in
> the context of this discussion. Specifically, are you saying its a
> idea to initialize a softc that isn't really a softc (as Tsutsui-san
> suggests), or that it is a bad idea to use some pseudo-softc structure
> (ala struct com_regs) like I've done?
The former. It is bad practice, IMO, to create a softc that isn't
really a softc.
> Personally, I find the idea of initializing a softc structure with a
> bunch of stuff in it that won't be used (and maybe isn't initialized)
> ugly -- and possibly error prone. (Some assumes they are dealing
> with a
> normal softc and prints sc_dev.dv_xname, for instance. Is that
> initialized to a sane value? Who knows?)
I agree. It will get even uglier come the say when softc structures
do not directly contain a "struct device".
> I think my approach is still pretty sane.
I haven't looked at the diffs yet, but in general I agree.