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  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]
Date:   Thu, 24 Dec 2020 14:22:02 +0300
From:   Nikita Shubin <nikita.shubin@...uefel.me>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Nikita Shubin <nikita.shubin@...uefel.me>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RFC PATCH 2/3] gpio: ep93xx: drop to_irq binding

As ->to_irq is redefined in gpiochip_add_irqchip, having it defined in
driver is useless, so let's drop it.

Also i think it is worth to give a gentle warning in
gpiochip_add_irqchip, to prevent people relying on to_irq.

For example

WARN_ON_ONCE(gc->to_irq,
"to_irq is redefined in gpiochip_add_irqchip" \
"and you shouldn't rely on it\n");

Signed-off-by: Nikita Shubin <nikita.shubin@...uefel.me>
---
 drivers/gpio/gpio-ep93xx.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index d6db0ff16581..90afe07213ce 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -325,11 +325,6 @@ static int ep93xx_gpio_set_config(struct gpio_chip *gc, unsigned offset,
 	return 0;
 }
 
-static int ep93xx_gpio_f_to_irq(struct gpio_chip *gc, unsigned offset)
-{
-	return EP93XX_GPIO_F_IRQ_BASE + offset;
-}
-
 static int ep93xx_gpio_add_ab_irq_chip(struct gpio_chip *gc,
 					struct platform_device *pdev,
 					struct ep93xx_irq_chip *eic,
@@ -407,7 +402,6 @@ static int ep93xx_gpio_add_f_irq_chip(struct gpio_chip *gc,
 	}
 	girq->default_type = IRQ_TYPE_NONE;
 	girq->handler = handle_level_irq;
-	gc->to_irq = ep93xx_gpio_f_to_irq;
 
 	return 0;
 }
-- 
2.26.2

Powered by blists - more mailing lists