linux-next: build failure after merge of the gpio tree
Subsystems (2)
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=yCONFIG_PINCTRL=yCONFIG_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
@@ -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
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: exportof_pinctrl_getto modulesSigned-off-by Stephen Rothwell <[email protected]>
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
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
-0static 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 ininclude/linux/pinctrl/pinctrl.hinstead?
Makes sense to me.
Signature · 2 lines
Cheers, Stephen Rothwell
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 ininclude/linux/pinctrl/pinctrl.hinstead?
I'm all for it! :)
Yours,
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 ininclude/linux/pinctrl/pinctrl.hinstead?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
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 ininclude/linux/pinctrl/pinctrl.hinstead?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
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 ininclude/linux/pinctrl/pinctrl.hinstead?
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
Quoted 5 lines · Stephen Rothwell
From: Stephen Rothwell <[email protected]>
Date: Wed, 1 Apr 2020 15:14:32 +1100
Subject: [PATCH] gpio: exportof_pinctrl_getto modulesSigned-off-by Stephen Rothwell <[email protected]>
As noted by Geert I simply applied this to quickly repair the build. Thanks a lot Stephen!
Yours,
Linus Walleij