From: Alexandre Courbot <gnurou@gmail.com>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jiri Kosina <trivial@kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
patches@linaro.org, linaro-kernel@lists.linaro.org,
John Stultz <john.stultz@linaro.org>,
Sumit Semwal <sumit.semwal@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH] gpio: msm-v1: Fix typo in function argument
Date: Mon, 27 Oct 2014 14:00:21 +0900 [thread overview]
Message-ID: <CAAVeFuLZJtdUXNyT6Nbi7jbZ-MsVjUFkmPg9oVEa=ZpkZRwkbw@mail.gmail.com> (raw)
In-Reply-To: <1414160997-30575-1-git-send-email-daniel.thompson@linaro.org>
On Fri, Oct 24, 2014 at 11:29 PM, Daniel Thompson
<daniel.thompson@linaro.org> wrote:
> irq_set_irq_wake() treats its second argument as a boolean. It is much
> easier to read code when constant booleans are either 0 or 1!
>
> This particular line of code distracted me somewhat when I was doing a bit of
> work in a code browser since it (spuriously) got me worried that I had
> misunderstood how irq_set_irq_wake() worked.
>
> Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> ---
> drivers/gpio/gpio-msm-v1.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-msm-v1.c b/drivers/gpio/gpio-msm-v1.c
> index 73b7396..997e61e 100644
> --- a/drivers/gpio/gpio-msm-v1.c
> +++ b/drivers/gpio/gpio-msm-v1.c
> @@ -686,7 +686,7 @@ static int gpio_msm_v1_probe(struct platform_device *pdev)
> irq_set_chained_handler(irq1, msm_gpio_irq_handler);
> irq_set_chained_handler(irq2, msm_gpio_irq_handler);
> irq_set_irq_wake(irq1, 1);
> - irq_set_irq_wake(irq2, 2);
> + irq_set_irq_wake(irq2, 1);
> return 0;
That could be confusing indeed.
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
next prev parent reply other threads:[~2014-10-27 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 14:29 [PATCH] gpio: msm-v1: Fix typo in function argument Daniel Thompson
2014-10-27 5:00 ` Alexandre Courbot [this message]
2014-10-30 15:00 ` 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='CAAVeFuLZJtdUXNyT6Nbi7jbZ-MsVjUFkmPg9oVEa=ZpkZRwkbw@mail.gmail.com' \
--to=gnurou@gmail.com \
--cc=daniel.thompson@linaro.org \
--cc=john.stultz@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@linaro.org \
--cc=sumit.semwal@linaro.org \
--cc=trivial@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).