Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2013 16:14:12 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Sean Bruno <sbruno@freebsd.org>
Cc:        freebsd-embedded <freebsd-embedded@freebsd.org>
Subject:   Re: off by one error, maxpins
Message-ID:  <CAJ-VmomPefJierbCdmkcNZ0QoZckL3Vat5CibyuJrXgGDmXszQ@mail.gmail.com>
In-Reply-To: <1378421252.1647.21.camel@localhost>
References:  <1378420702.1647.18.camel@localhost> <FA19C2B0-8128-4A30-AF38-DDFD7F41AE82@bsdimp.com> <1378421252.1647.21.camel@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
Commit ahoy. :)


-a


On 5 September 2013 15:47, Sean Bruno <sean_bruno@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.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomPefJierbCdmkcNZ0QoZckL3Vat5CibyuJrXgGDmXszQ>