lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120930123519.5bddb2cd@skate>
Date:	Sun, 30 Sep 2012 12:35:19 +0200
From:	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Linus Walleij <linus.walleij@...ricsson.com>,
	Jason Cooper <jason@...edaemon.net>,
	Grant Likely <grant.likely@...retlab.ca>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
	Andrew Lunn <andrew@...n.ch>, Arnd Bergmann <arnd@...db.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio: mvebu: Add missing breaks in
 mvebu_gpio_irq_set_type

Dear Axel Lin,

On Sun, 30 Sep 2012 16:23:27 +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@...ics.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@...e-electrons.com>

-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ