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-next>] [day] [month] [year] [list]
Date:	Tue, 16 Feb 2016 16:40:34 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	linux-arm-kernel@...ts.infradead.org,
	Arnd Bergmann <arnd@...db.de>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Alexandre Courbot <gnurou@...il.com>,
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Lars-Peter Clausen <lars@...afoo.de>,
	Ralf Baechle <ralf@...ux-mips.org>, linux-mips@...ux-mips.org,
	"# v4 . 3+" <stable@...r.kernel.org>, Alban Bedel <albeu@...e.fr>,
	Thomas Gleixner <tglx@...utronix.de>,
	Paul Burton <paul.burton@...tec.com>
Subject: [PATCH v2 1/5] MIPS: jz4740: remove broken irq_to_gpio() call

gpiolib has removed the irq_to_gpio() API several years ago,
but the global header still provided a non-working stub.

With a MIPS-wide change to use the generic header file, the jz4740
platform is now using the wrong stub implementation of irq_to_gpio(),
which cannot work.

This uses an open-coded implementation in the only line it
is used in.

Suggested-by: Lars-Peter Clausen <lars@...afoo.de>
Signed-off-by: Arnd Bergmann <arnd@...db.de>
Cc: <stable@...r.kernel.org> # v4.3+
Fixes: 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h").
---
 arch/mips/jz4740/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c
index 8c6d76c9b2d6..d9907e57e9b9 100644
--- a/arch/mips/jz4740/gpio.c
+++ b/arch/mips/jz4740/gpio.c
@@ -270,7 +270,7 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t mask)
 }
 EXPORT_SYMBOL(jz_gpio_port_get_value);
 
-#define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f)
+#define IRQ_TO_BIT(irq) BIT((irq - JZ4740_IRQ_GPIO(0)) & 0x1f)
 
 static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq)
 {
-- 
2.7.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ