off by one error, maxpins

Sean Bruno sean_bruno at yahoo.com
Thu Sep 5 22:47:35 UTC 2013


On Thu, 2013-09-05 at 16:42 -0600, Warner Losh wrote:
> Shouldn't npins and/or maxpin just be bumped by 1 instead?
> 
> Warner
> 
> On Sep 5, 2013, at 4:38 PM, Sean Bruno wrote:
> 
> > http://people.freebsd.org/~sbruno/maxpin_plus_one.txt
> > 

It looks like its  *intentionally* assigned as the h/w specific (GPIO
COUNT) -1 in ar71xx_gpio_pin_max()

Userland assumes that this value is a 0-based thing.  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/freebsd-embedded/attachments/20130905/1a740885/attachment.sig>


More information about the freebsd-embedded mailing list