pinctrl: tegra: do not export tegra_pinctrl_probe
Subsystems (3)
PATCH 1/2 pinctrl: tegra: do not export tegra_pinctrl_probe
No user of tegra_pinctrl_probe can be built as a module, hence exporting the symbol is not necessary. Drop EXPORT_SYMBOL_GPL.
--- drivers/pinctrl/tegra/pinctrl-tegra.c | 1 - 1 file changed, 1 deletion(-)
drivers/pinctrl/tegra/pinctrl-tegra.c +0 -1
@@ -737,4 +737,3 @@ int tegra_pinctrl_probe(struct platform_device *pdev,return 0 ; } -EXPORT_SYMBOL_GPL (tegra_pinctrl_probe);
Signature · 1 line
2.19.0
PATCH 2/2 pinctrl: tegra: move probe to __init section
The Tegra pinctrl drivers are always built-in. This allows to use platform_driver_probe() and mark several functions as __init. This allows the kernel to free about 1KiB of memory if Tegra pinctrl drivers are not used.
--- drivers/pinctrl/tegra/pinctrl-tegra.c | 6 +++--- drivers/pinctrl/tegra/pinctrl-tegra114.c | 6 +++--- drivers/pinctrl/tegra/pinctrl-tegra124.c | 6 +++--- drivers/pinctrl/tegra/pinctrl-tegra20.c | 6 +++--- drivers/pinctrl/tegra/pinctrl-tegra30.c | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-)
drivers/pinctrl/tegra/pinctrl-tegra.c +3 -3
@@ -613,7 +613,7 @@ static struct pinctrl_desc tegra_pinctrl_desc = { .owner = THIS_MODULE, }; -static void tegra_pinctrl_clear_parked_bits (struct tegra_pmx *pmx) +static void __init tegra_pinctrl_clear_parked_bits (struct tegra_pmx *pmx) {int i =0 ;const struct tegra_pingroup *g;
@@ -629,7 +629,7 @@ static void tegra_pinctrl_clear_parked_bits(struct tegra_pmx *pmx) } } -static bool gpio_node_has_range (const char *compatible) +static bool __init gpio_node_has_range (const char *compatible) {struct device_node *np;bool has_prop = false;
@@ -645,7 +645,7 @@ static bool gpio_node_has_range(const char *compatible)return has_prop; } -int tegra_pinctrl_probe (struct platform_device *pdev, +int __init tegra_pinctrl_probe (struct platform_device *pdev,const struct tegra_pinctrl_soc_data *soc_data) {struct tegra_pmx *pmx;
drivers/pinctrl/tegra/pinctrl-tegra114.c +3 -3
@@ -1851,7 +1851,7 @@ static const struct tegra_pinctrl_soc_data tegra114_pinctrl = { .drvtype_in_mux = false, }; -static int tegra114_pinctrl_probe (struct platform_device *pdev) +static int __init tegra114_pinctrl_probe (struct platform_device *pdev) {return tegra_pinctrl_probe (pdev, &tegra114_pinctrl); }
@@ -1866,11 +1866,11 @@ static struct platform_driver tegra114_pinctrl_driver = { .name = "tegra114-pinctrl", .of_match_table = tegra114_pinctrl_of_match, }, - .probe = tegra114_pinctrl_probe, };static int __init tegra114_pinctrl_init (void ) { -return platform_driver_register (&tegra114_pinctrl_driver); +return platform_driver_probe (&tegra114_pinctrl_driver, + tegra114_pinctrl_probe); }arch_initcall (tegra114_pinctrl_init);
drivers/pinctrl/tegra/pinctrl-tegra124.c +3 -3
@@ -2063,7 +2063,7 @@ static const struct tegra_pinctrl_soc_data tegra124_pinctrl = { .drvtype_in_mux = false, }; -static int tegra124_pinctrl_probe (struct platform_device *pdev) +static int __init tegra124_pinctrl_probe (struct platform_device *pdev) {return tegra_pinctrl_probe (pdev, &tegra124_pinctrl); }
@@ -2078,11 +2078,11 @@ static struct platform_driver tegra124_pinctrl_driver = { .name = "tegra124-pinctrl", .of_match_table = tegra124_pinctrl_of_match, }, - .probe = tegra124_pinctrl_probe, };static int __init tegra124_pinctrl_init (void ) { -return platform_driver_register (&tegra124_pinctrl_driver); +return platform_driver_probe (&tegra124_pinctrl_driver, + tegra124_pinctrl_probe); }arch_initcall (tegra124_pinctrl_init);
drivers/pinctrl/tegra/pinctrl-tegra20.c +3 -3
@@ -2252,7 +2252,7 @@ static void tegra20_pinctrl_register_clock_muxes(struct platform_device *pdev) pmx->regs[1] + 0x8, 4, 2, CLK_MUX_READ_ONLY, NULL); } -static int tegra20_pinctrl_probe (struct platform_device *pdev) +static int __init tegra20_pinctrl_probe (struct platform_device *pdev) {int err;
@@ -2275,11 +2275,11 @@ static struct platform_driver tegra20_pinctrl_driver = { .name = "tegra20-pinctrl", .of_match_table = tegra20_pinctrl_of_match, }, - .probe = tegra20_pinctrl_probe, };static int __init tegra20_pinctrl_init (void ) { -return platform_driver_register (&tegra20_pinctrl_driver); +return platform_driver_probe (&tegra20_pinctrl_driver, + tegra20_pinctrl_probe); }arch_initcall (tegra20_pinctrl_init);
drivers/pinctrl/tegra/pinctrl-tegra30.c +3 -3
@@ -2486,7 +2486,7 @@ static const struct tegra_pinctrl_soc_data tegra30_pinctrl = { .drvtype_in_mux = false, }; -static int tegra30_pinctrl_probe (struct platform_device *pdev) +static int __init tegra30_pinctrl_probe (struct platform_device *pdev) {return tegra_pinctrl_probe (pdev, &tegra30_pinctrl); }
@@ -2501,11 +2501,11 @@ static struct platform_driver tegra30_pinctrl_driver = { .name = "tegra30-pinctrl", .of_match_table = tegra30_pinctrl_of_match, }, - .probe = tegra30_pinctrl_probe, };static int __init tegra30_pinctrl_init (void ) { -return platform_driver_register (&tegra30_pinctrl_driver); +return platform_driver_probe (&tegra30_pinctrl_driver, + tegra30_pinctrl_probe); }arch_initcall (tegra30_pinctrl_init);
Signature · 1 line
2.19.0
kbuild test robot
build botRe: [PATCH 2/2] pinctrl: tegra: move probe to __init section
I love your patch! Perhaps something to improve:
Hi Stefan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tegra/for-next]
[also build test WARNING on v4.19-rc4 next-20180919]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Stefan-Agner/pinctrl-tegra-do-not-export-tegra_pinctrl_probe/20180919-174106 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm64
All warnings (new ones prefixed by >>):
>> WARNING: vmlinux.o(.text+0x8acbf0): Section mismatch in reference from the function tegra210_pinctrl_probe() to the function .init.text:tegra_pinctrl_probe()
The function tegra210_pinctrl_probe() references the function __init tegra_pinctrl_probe().
This is often because tegra210_pinctrl_probe lacks a __init annotation or the annotation of tegra_pinctrl_probe is wrong.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH 2/2] pinctrl: tegra: move probe to __init section
In reply to Stefan AgnerQuoted 6 lines · Stefan Agner
The Tegra pinctrl drivers are always built-in. This allows to use
platform_driver_probe()and mark several functions as__init. This allows the kernel to free about 1KiB of memory if Tegra pinctrl drivers are not used.Signed-off-by Stefan Agner <[email protected]>
It appears the test robot complains about this patch, so I'll wait for a v2!
Yours,
Linus Walleij
Re: [PATCH 2/2] pinctrl: tegra: move probe to __init section
Quoted 11 lines · Linus Walleij
Quoted 6 lines · Stefan Agner
The Tegra pinctrl drivers are always built-in. This allows to use
platform_driver_probe()and mark several functions as__init. This allows the kernel to free about 1KiB of memory if Tegra pinctrl drivers are not used.Signed-off-by Stefan Agner <[email protected]>It appears the test robot complains about this patch, so I'll wait for a v2!
Yes I saw it, will send v2 of this patch only.
--
Stefan
Quoted 3 lines
Yours,
Linus Walleij
Quoted 4 lines · Stefan Agner
No user of
tegra_pinctrl_probecan be built as a module, hence exporting the symbol is not necessary. DropEXPORT_SYMBOL_GPL.Signed-off-by Stefan Agner <[email protected]>
Patch applied.
Yours,
Linus Walleij