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

Linus Torvalds torvalds at linux-foundation.org
Sat Apr 2 16:33:00 PDT 2016


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?

   Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160402/2136d20b/attachment-0001.html>


More information about the subsurface mailing list