[PATCH 3/4] Make gas change events always have a cylinder index

Dirk Hohndel dirk at hohndel.org
Sat Apr 2 16:42:23 PDT 2016


On Sat, Apr 02, 2016 at 06:33:00PM -0500, Linus Torvalds wrote:
> On Apr 2, 2016 18:14, "Dirk Hohndel" <dirk at hohndel.org> wrote:
> >
> > So you add the dive pointer to the function signature, but you don't do
> > anything with it, creating an unused parameter. Why?
> 
> Next patch will do it.
> 
> The dive pointer is necessary to look up the cylinder, but this patch tries
> to avoid actually changing behavior.
> 
> So all of this patch is basically prep.
> 
> That said, it does change behavior in some ways: just by virtue of setting
> the cylinder number this patch triggers behavior changes, because having a
> cylinder index on the gas change will mean that it gets shown and saved.
> 
> Similarly, if the gas change cannot actually be matched up to any cylinder,
> it will be thrown away, again being technically a behavior change.
> 
> So it's not entirely just infrastructure with no behavior change at all,
> but this patch basically just does stricter checking and introduces
> behavior that you *could* get before by specifying the cylinder index.
> 
> The next patch that actually uses the cylinder gas mix information is a
> more fundamental behavior change, in the sense that it actually introduces
> behavior that you couldn't even force before.
> 
> Does that explain the patch?

Yep, that works. I'll fix the whitespace bubu :-)

/D


More information about the subsurface mailing list