off by one error, maxpins

Adrian Chadd adrian at freebsd.org
Thu Sep 5 23:14:15 UTC 2013


Commit ahoy. :)


-a


On 5 September 2013 15:47, Sean Bruno <sean_bruno at yahoo.com> wrote:

> 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.
>


More information about the freebsd-embedded mailing list