]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
gpio: mvebu: don't print out global GPIO numbers in debugfs callbacks
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 26 Aug 2025 09:54:39 +0000 (11:54 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 3 Sep 2025 07:38:13 +0000 (09:38 +0200)
In order to further limit the number of references to the GPIO base
number stored in struct gpio_chip, replace the global GPIO numbers in
the output of debugfs callbacks by hardware offsets.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250826-gpio-dbg-show-base-v1-5-7f27cd7f2256@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-mvebu.c

index 261ffd0c614b7189287c361f392f3df6d1b0bc57..ac799fced950e306a967d1965a13f8e1802e77b4 100644 (file)
@@ -898,7 +898,7 @@ static void mvebu_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
                msk = BIT(i);
                is_out = !(io_conf & msk);
 
-               seq_printf(s, " gpio-%-3d (%-20.20s)", chip->base + i, label);
+               seq_printf(s, " gpio-%-3d (%-20.20s)", i, label);
 
                if (is_out) {
                        seq_printf(s, " out %s %s\n",