From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Linus Walleij <linus.walleij@stericsson.com>,
Jason Cooper <jason@lakedaemon.net>,
Grant Likely <grant.likely@secretlab.ca>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
Date: Sun, 30 Sep 2012 12:35:19 +0200 [thread overview]
Message-ID: <20120930123519.5bddb2cd@skate> (raw)
In-Reply-To: <1348993407.20815.1.camel@phoenix>
Dear Axel Lin,
On Sun, 30 Sep 2012 16:23:27 +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/gpio/gpio-mvebu.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index 902af43..7a874129 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -381,11 +381,13 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
> u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
> u &= ~(1 << pin);
> writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> + break;
> case IRQ_TYPE_EDGE_FALLING:
> case IRQ_TYPE_LEVEL_LOW:
> u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
> u |= 1 << pin;
> writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> + break;
> case IRQ_TYPE_EDGE_BOTH: {
> u32 v;
>
> @@ -401,6 +403,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
> else
> u &= ~(1 << pin); /* rising */
> writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> + break;
> }
> }
> return 0;
Doh, I missed this when converting the if() series to a switch()
construct. It was just pure luck that it worked. Good catch indeed.
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-09-30 10:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-30 8:23 [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type Axel Lin
2012-09-30 8:45 ` Andrew Lunn
2012-09-30 10:35 ` Thomas Petazzoni [this message]
2012-09-30 21:49 ` Linus Walleij
2012-10-01 0:11 ` Jason Cooper
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=20120930123519.5bddb2cd@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=axel.lin@ingics.com \
--cc=grant.likely@secretlab.ca \
--cc=jason@lakedaemon.net \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sebastian.hesselbarth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox