From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: Alexandre Courbot <gnurou@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 1/4] Revert "gpio: generic: clamp retured value to [0,1]"
Date: Tue, 12 May 2015 10:54:26 +0300 [thread overview]
Message-ID: <5551B1B2.4070606@mentor.com> (raw)
In-Reply-To: <CAAVeFuLW6xzgMa0AxA_MW9idkwohyC6c93ZhG-hGvE+OdyJ+jg@mail.gmail.com>
Hi Alexandre,
On 12.05.2015 10:45, Alexandre Courbot wrote:
> Hi Vladimir,
>
> On Mon, May 11, 2015 at 10:12 PM, Vladimir Zapolskiy
> <vladimir_zapolskiy@mentor.com> wrote:
>> Hi Linus,
>>
>> On 11.05.2015 12:46, Linus Walleij wrote:
>>> On Wed, Apr 29, 2015 at 5:34 PM, Vladimir Zapolskiy
>>> <vladimir_zapolskiy@mentor.com> wrote:
>>>
>>>> This reverts commit 25b35da7f4cce82271859f1b6eabd9f3bd41a2bb.
>>>>
>>>> The original change is a fast workaround in GPIO generic driver,
>>>> which is properly fixed by Alexandre's 23600969ff centralized handling
>>>> of return values from GPIO chip drivers.
>>>>
>>>> To avoid a redundant check and copy/paste confusion, it is better to
>>>> revert the change done in a particular driver.
>>>>
>>>> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
>>>
>>> I'm gonna drop this patch, because the code is helpful like this,
>>> clear to see what is going on.
>>>
>>> In the long run I want to change the signature of the get/set functions
>>> to take bools because that is what they actually handle.
>>
>> thank you for review.
>>
>> In my opinion (and according to my tests of course) it is safe to apply
>> this revert commit, also the commit is anyway needed, when you switch to
>> bool return values.
>>
>> I understand your wish to keep this code as a hint for the planned
>> updates in the future, if price of the dead code plus small deviation
>> between bgpio_get() and bgpio_get_set() is less than price of the hint
>> in your opinion, I have no objections to skip this patch.
>
> I'd also agree with Linus that we could live without this patch until
> we switch the functions to return bools.
>
> Actually, with implicit type conversion doing most of the job, I
> wonder if it would be that hard to do - maybe you will want to give it
> a quick try?
>
it should be quite a simple and straightforward change, I'll prepare
patches for review, thank you for offering the task.
--
With best wishes,
Vladimir
next prev parent reply other threads:[~2015-05-12 7:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 15:34 [PATCH 0/4] gpio: generic: add option to read output value from set register Vladimir Zapolskiy
2015-04-29 15:34 ` [PATCH 1/4] Revert "gpio: generic: clamp retured value to [0,1]" Vladimir Zapolskiy
2015-05-11 9:46 ` Linus Walleij
2015-05-11 13:12 ` Vladimir Zapolskiy
2015-05-12 7:45 ` Alexandre Courbot
2015-05-12 7:54 ` Vladimir Zapolskiy [this message]
2015-05-12 11:52 ` Linus Walleij
2015-04-29 15:34 ` [PATCH 2/4] gpio: gpio-generic: add flag to read out output value from reg_set Vladimir Zapolskiy
2015-05-11 9:50 ` Linus Walleij
2015-05-11 13:28 ` Vladimir Zapolskiy
2015-04-29 15:35 ` [PATCH 3/4] gpio: moxart: get value of output gpio from generic driver Vladimir Zapolskiy
2015-05-11 9:52 ` Linus Walleij
2015-05-11 12:17 ` Jonas Jensen
2015-05-11 13:17 ` Vladimir Zapolskiy
2015-04-29 15:35 ` [PATCH 4/4] gpio: mxc: read output value from GPIO_DR register Vladimir Zapolskiy
2015-05-11 9:54 ` 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=5551B1B2.4070606@mentor.com \
--to=vladimir_zapolskiy@mentor.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.