From: Linus Walleij <linus.walleij@linaro.org>
To: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH V2 1/2] gpiolib: improve overlap check of range of gpio
Date: Tue, 17 Nov 2015 15:14:57 +0100 [thread overview]
Message-ID: <CACRpkdYOQfMV46GCRfKBxeUFwz7FjUGw-r6Gej6SWef0_j03_A@mail.gmail.com> (raw)
In-Reply-To: <1447650167-29070-2-git-send-email-bamvor.zhangjian@linaro.org>
On Mon, Nov 16, 2015 at 6:02 AM, Bamvor Jian Zhang
<bamvor.zhangjian@linaro.org> wrote:
> There are limitations for the current checker:
> 1. Could not check the overlap if the new gpiochip is the secondly
> gpiochip.
> 2. Could not check the overlap if the new gpiochip is overlap
> with the left of gpiochip. E.g. if we insert [c, d] between
> [a,b] and [e, f], and e >= c + d, it will successful even if
> c < a + b.
> 3. Allow overlap of base of different gpiochip.
>
> This patch fix these issues by checking the overlap of both right and
> left gpiochip in the same loop statement.
>
> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Patch applied with some tweaks. Had to rebase it because
I renamed ->dev to ->parent in the GPIO tree, then I found
it possible to get rid of the ret variable altogether.
Yours,
Linus Walleij
next prev parent reply other threads:[~2015-11-17 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 5:02 [PATCH V2 0/2] Fix bugs in the insertion of gpiochip Bamvor Jian Zhang
2015-11-16 5:02 ` [PATCH V2 1/2] gpiolib: improve overlap check of range of gpio Bamvor Jian Zhang
2015-11-17 14:14 ` Linus Walleij [this message]
2015-11-17 14:47 ` Bamvor Zhang Jian
2015-11-16 5:02 ` [PATCH V2 2/2] gpiolib: do not allow to insert an empty gpiochip Bamvor Jian Zhang
2015-11-17 14:16 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACRpkdYOQfMV46GCRfKBxeUFwz7FjUGw-r6Gej6SWef0_j03_A@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=bamvor.zhangjian@linaro.org \
--cc=broonie@kernel.org \
--cc=linux-gpio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).