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]
Message-Id: <20230226205357.1013504-1-dario.binacchi@amarulasolutions.com>
Date:   Sun, 26 Feb 2023 21:53:57 +0100
From:   Dario Binacchi <dario.binacchi@...rulasolutions.com>
To:     linux-kernel@...r.kernel.org
Cc:     Dario Binacchi <dario.binacchi@...rulasolutions.com>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Fabio Estevam <festevam@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        NXP Linux Team <linux-imx@....com>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Shawn Guo <shawnguo@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org
Subject: [PATCH] gpio: mxs: use dynamic allocation of base

Since commit 502df79b860563d7 ("gpiolib: Warn on drivers still using static
gpiobase allocation"), one or more warnings are printed during boot on
systems where static allocation of GPIO base is used:

[    0.136834] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.142753] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.148452] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.154341] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.160097] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation.

So let's follow the suggestion and use dynamic allocation.

Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com>
---

 drivers/gpio/gpio-mxs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 7f59e5d936c2..b48a7c1fb7c1 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -330,7 +330,7 @@ static int mxs_gpio_probe(struct platform_device *pdev)
 
 	port->gc.to_irq = mxs_gpio_to_irq;
 	port->gc.get_direction = mxs_gpio_get_direction;
-	port->gc.base = port->id * 32;
+	port->gc.base = -1;
 
 	err = gpiochip_add_data(&port->gc, port);
 	if (err)
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ