Subject: Re: onewire bus patch for review
To: Jared D. McNeill <jmcneill@invisible.ca>
From: Jeff Rizzo <riz@NetBSD.org>
List: tech-kern
Date: 04/05/2006 12:09:18
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigC93EE32D6A0F23FB366E58F0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Jared D. McNeill wrote:
> On 4-Apr-06, at 9:59 PM, Jeff Rizzo wrote:
>
>> I'd appreciate any feedback on the patches, which can be found here:
>>
>> http://www.tastylime.net/netbsd/onewire.diff
>
> Maybe you can constify the values returned from onewire_triplet() ?
> Reading through the patch, I have no idea what the switch statement
> after the call is trying to do.
>

Yeah, the code is commented fairly poorly - I should add a few things
(like where the search algorithm is specified).  I actually only just
figured out what you meant by "constify the values" as I was typing
this.  :)   I'm not sure that turning the values in the switch into
labels is the best approach (I'll think about it), but I agree that some
additional comments are warranted.  My thought is, however, to commit
the code more or less as-is, then add the comments in a second revision
(of whatever appropriate files) to have a base that's "closer" to the
original OpenBSD code for bringing in future patches - there are a _lot_
of onewire devices out there, and only a small fraction are currently
supported, so it's not unreasonable to assume that new device support
will appear in both OpenBSD and NetBSD, and making things simple to
exchange between OSes is a good goal.

+j


--------------enigC93EE32D6A0F23FB366E58F0
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRDQV4rOuUtxCgar5AQO9ugP/UxSXNRfJ2UFdJxMB3KLE5u7GvqmdMWBQ
4t5F7V1HIvyWJIU1FVYaLvo3tXhY7PqNYrZv/Fj/pTzhQkIs1A8b++PM00Xn6sdo
jkaufkX8xKe45wv2IzmBO9bDZ4EZZh0S+4jIVbDHtgjkVPEYvyoYn3kwSVOoi/3e
9qxunmDBhuI=
=OGDm
-----END PGP SIGNATURE-----

--------------enigC93EE32D6A0F23FB366E58F0--