Skip to contentSkip to conversation

linux-next: build failure after merge of the gpio tree

PATCH Stephen Rothwell 4 participants 8 messages Apr 1, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the gpio tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: modpost: "of_pinctrl_get" [drivers/gpio/gpio-tegra186.ko] undefined!

Caused by commit

b64d6c9a6a05 ("gpio: tegra186: Add support for pin ranges")

and not fixed by commit

e45ee71ae101 ("pinctrl: Define of_pinctrl_get() dummy for !PINCTRL")

CONFIG_OF=y
CONFIG_PINCTRL=y
CONFIG_GPIO_TEGRA186=m

I applied this patch:

From: Stephen Rothwell <[email protected]>
Date: Wed, 1 Apr 2020 15:14:32 +1100
Subject: [PATCH] gpio: export of_pinctrl_get to modules

---
 drivers/pinctrl/devicetree.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/devicetree.c +1 -0
index 1ed20ac2243f..c6fe7d64c913 100644
@@ -103,6 +103,7 @@ struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
 {
 	return get_pinctrl_dev_from_of_node(np);
 }
+EXPORT_SYMBOL_GPL(of_pinctrl_get);
 
 static int dt_to_map_one_config(struct pinctrl *p,
 				struct pinctrl_dev *hog_pctldev,
Signature · 5 lines
2.25.0

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi Stephen, LinusW,

Quoted 5 lines · Stephen Rothwell

From: Stephen Rothwell <[email protected]>
Date: Wed, 1 Apr 2020 15:14:32 +1100
Subject: [PATCH] gpio: export of_pinctrl_get to modules

Thanks for your patch, which I assume is a quick build fix. I see LinusW has already applied it...

drivers/pinctrl/devicetree.c struct pinctrl_dev *of_pinctrl_get(struct device_node *np) · line 109

Quoted 10 lines
drivers/pinctrl/devicetree.c +1 -0
@@ -103,6 +103,7 @@ struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
 {
        return get_pinctrl_dev_from_of_node(np);
 }
+EXPORT_SYMBOL_GPL(of_pinctrl_get);
 
 static int dt_to_map_one_config(struct pinctrl *p,
                                struct pinctrl_dev *hog_pctldev,

As exporting symbols has its (space) cost, and of_pinctrl_get() is a tiny function, what about making it an inline function in include/linux/pinctrl/pinctrl.h instead?

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#2 lore raw

Hi Geert,

Quoted 2 lines · On Wed, 1 Apr 2020 09:49:00 +0200 Geert Uytterhoeven <[email protected]>…

Thanks for your patch, which I assume is a quick build fix.

Yep, rather than reverting the other patches again.

Quoted 10 lines

I see LinusW has already applied it...

Quoted 8 lines
drivers/pinctrl/devicetree.c +1 -0
@@ -103,6 +103,7 @@ struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
 {
        return get_pinctrl_dev_from_of_node(np);
 }
+EXPORT_SYMBOL_GPL(of_pinctrl_get);
 
Quoted 6 lines

drivers/pinctrl/devicetree.c struct pinctrl_dev *of_pinctrl_get(struct device_node *np) · line 109

Quoted 2 lines
drivers/pinctrl/devicetree.c +0 -0
 static int dt_to_map_one_config(struct pinctrl *p,
                                struct pinctrl_dev *hog_pctldev,  

As exporting symbols has its (space) cost, and of_pinctrl_get() is a tiny function, what about making it an inline function in include/linux/pinctrl/pinctrl.h instead?

Makes sense to me.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
In reply to Geert Uytterhoeven
Quoted 5 lines · Geert Uytterhoeven
Quoted 1 line

+EXPORT_SYMBOL_GPL(of_pinctrl_get);

As exporting symbols has its (space) cost, and of_pinctrl_get() is a tiny function, what about making it an inline function in include/linux/pinctrl/pinctrl.h instead?

I'm all for it! :)

Yours,
Linus Walleij

#4 lore raw
In reply to Linus Walleij

Hi Linus,

Quoted 8 lines · Linus Walleij
Quoted 5 lines · Geert Uytterhoeven
Quoted 1 line

+EXPORT_SYMBOL_GPL(of_pinctrl_get);

As exporting symbols has its (space) cost, and of_pinctrl_get() is a tiny function, what about making it an inline function in include/linux/pinctrl/pinctrl.h instead?

I'm all for it! :)

Want me to send a patch?
Which base?

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#5 lore raw
Quoted 4 lines · Geert Uytterhoeven
Quoted 3 lines · Linus Walleij
Quoted 2 lines · Geert Uytterhoeven
Quoted 1 line

+EXPORT_SYMBOL_GPL(of_pinctrl_get);

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

As exporting symbols has its (space) cost, and of_pinctrl_get() is a tiny function, what about making it an inline function in include/linux/pinctrl/pinctrl.h instead?

I'm all for it! :)

Want me to send a patch?
Which base?

Wouldn't we need to export the inside function in that case? If so, we need a better name for it.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#6 lore raw
Quoted 10 lines · Andy Shevchenko
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Geert Uytterhoeven
Quoted 1 line

+EXPORT_SYMBOL_GPL(of_pinctrl_get);

As exporting symbols has its (space) cost, and of_pinctrl_get() is a tiny function, what about making it an inline function in include/linux/pinctrl/pinctrl.h instead?

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I'm all for it! :)

Want me to send a patch?
Which base?

Wouldn't we need to export the inside function in that case? If so, we need a better name for it.

And wouldn't be cost even more expensive in such case due length of the function name?

Signature · 2 lines
With Best Regards,
Andy Shevchenko