From: Stephen Warren <swarren@wwwdotorg.org>
To: Laxman Dewangan <ldewangan@nvidia.com>, linus.walleij@linaro.org
Cc: gnurou@gmail.com, thierry.reding@gmail.com,
linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] gpio: tegra: Remove the need of keeping device handle for gpio driver
Date: Tue, 19 Apr 2016 09:58:10 -0600 [thread overview]
Message-ID: <57165592.50706@wwwdotorg.org> (raw)
In-Reply-To: <571512B0.90303@nvidia.com>
On 04/18/2016 11:00 AM, Laxman Dewangan wrote:
>
> On Monday 18 April 2016 09:59 PM, Stephen Warren wrote:
>> On 04/18/2016 02:46 AM, Laxman Dewangan wrote:
>>> Remove the file static device handle variable as this is just
>>> required for prints. The required handle can be stored in
>>> tegra_gpio_chip and hence it become redundancy.
>>
>> This seems fine as far as it goes, but if it's worth doing this,
>> please move all the globals into the GPIO chip rather than just one of
>> the 7 globals.
>
> the device pointer is part of the gpiochip and so it is better to use
> gpiochip parent member instead of locally duplicating.
>
> However, moving to other global variables needs some major changes and I
> think it should be treated as independent of this patch.
> This patch just utilizes the gpiochip.parent here.
Looking at the patch this just trades using one global (dev) for another
(tegra_gpio_chip), so when the other globals are removed, you'll need to
go back and change tegra_gpio_irq_set_type() again to remove use of the
global tegra_gpio_chip.
Still, this /does/ remove one global so I guess it's OK. I don't feel
terribly strongly, especially if you're going to send more patches soon
to remove the other globals. I'll leave the call to Linus.
next prev parent reply other threads:[~2016-04-19 15:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 8:46 [PATCH 1/3] gpio: tegra: Don't open code of_device_get_match_data() Laxman Dewangan
2016-04-18 8:46 ` Laxman Dewangan
2016-04-18 8:46 ` [PATCH 2/3] gpio: tegra: Remove the need of keeping device handle for gpio driver Laxman Dewangan
2016-04-18 8:46 ` Laxman Dewangan
2016-04-18 16:29 ` Stephen Warren
[not found] ` <57150B81.6040104-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-04-18 17:00 ` Laxman Dewangan
2016-04-18 17:00 ` Laxman Dewangan
2016-04-19 15:58 ` Stephen Warren [this message]
2016-04-20 1:16 ` Alexandre Courbot
2016-04-18 8:46 ` [PATCH 3/3] gpio: tegra: Add support for gpio debounce Laxman Dewangan
2016-04-18 8:46 ` Laxman Dewangan
[not found] ` <1460969178-20914-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-18 16:38 ` Stephen Warren
2016-04-18 16:38 ` Stephen Warren
2016-04-18 17:06 ` Laxman Dewangan
2016-04-18 17:06 ` Laxman Dewangan
2016-04-19 16:01 ` Stephen Warren
2016-04-18 16:29 ` [PATCH 1/3] gpio: tegra: Don't open code of_device_get_match_data() Stephen Warren
[not found] ` <1460969178-20914-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-20 0:56 ` Alexandre Courbot
2016-04-20 0:56 ` Alexandre Courbot
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=57165592.50706@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=gnurou@gmail.com \
--cc=ldewangan@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/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.