* [PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe @ 2018-09-19 1:24 Stefan Agner 2018-09-19 1:24 ` [PATCH 2/2] pinctrl: tegra: move probe to __init section Stefan Agner 2018-09-20 15:15 ` [PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe Linus Walleij 0 siblings, 2 replies; 6+ messages in thread From: Stefan Agner @ 2018-09-19 1:24 UTC (permalink / raw) To: linus.walleij, thierry.reding Cc: jonathanh, linux-gpio, linux-tegra, linux-kernel, Stefan Agner No user of tegra_pinctrl_probe can be built as a module, hence exporting the symbol is not necessary. Drop EXPORT_SYMBOL_GPL. Signed-off-by: Stefan Agner <stefan@agner.ch> --- drivers/pinctrl/tegra/pinctrl-tegra.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c index 1aba75897d147..a5008c066bac2 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c @@ -737,4 +737,3 @@ int tegra_pinctrl_probe(struct platform_device *pdev, return 0; } -EXPORT_SYMBOL_GPL(tegra_pinctrl_probe); -- 2.19.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] pinctrl: tegra: move probe to __init section 2018-09-19 1:24 [PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe Stefan Agner @ 2018-09-19 1:24 ` Stefan Agner 2018-09-20 3:28 ` kbuild test robot 2018-09-20 15:16 ` Linus Walleij 2018-09-20 15:15 ` [PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe Linus Walleij 1 sibling, 2 replies; 6+ messages in thread From: Stefan Agner @ 2018-09-19 1:24 UTC (permalink / raw) To: linus.walleij, thierry.reding Cc: jonathanh, linux-gpio, linux-tegra, linux-kernel, 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 <stefan@agner.ch> --- 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(-) diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c index a5008c066bac2..c263cb66a0287 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c @@ -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; diff --git a/drivers/pinctrl/tegra/pinctrl-tegra114.c b/drivers/pinctrl/tegra/pinctrl-tegra114.c index d43c209e9c30b..db1b970478146 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra114.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra114.c @@ -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); diff --git a/drivers/pinctrl/tegra/pinctrl-tegra124.c b/drivers/pinctrl/tegra/pinctrl-tegra124.c index 5b07a5834d155..38c08cbbd90aa 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra124.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra124.c @@ -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); diff --git a/drivers/pinctrl/tegra/pinctrl-tegra20.c b/drivers/pinctrl/tegra/pinctrl-tegra20.c index 1fc82a9576e06..205857b6ba256 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra20.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra20.c @@ -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); diff --git a/drivers/pinctrl/tegra/pinctrl-tegra30.c b/drivers/pinctrl/tegra/pinctrl-tegra30.c index 10e617003e9ce..5996cb7241134 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra30.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra30.c @@ -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); -- 2.19.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] pinctrl: tegra: move probe to __init section 2018-09-19 1:24 ` [PATCH 2/2] pinctrl: tegra: move probe to __init section Stefan Agner @ 2018-09-20 3:28 ` kbuild test robot 2018-09-20 15:16 ` Linus Walleij 1 sibling, 0 replies; 6+ messages in thread From: kbuild test robot @ 2018-09-20 3:28 UTC (permalink / raw) Cc: kbuild-all, linus.walleij, thierry.reding, jonathanh, linux-gpio, linux-tegra, linux-kernel, Stefan Agner [-- Attachment #1: Type: text/plain, Size: 1417 bytes --] 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 [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 60995 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] pinctrl: tegra: move probe to __init section 2018-09-19 1:24 ` [PATCH 2/2] pinctrl: tegra: move probe to __init section Stefan Agner 2018-09-20 3:28 ` kbuild test robot @ 2018-09-20 15:16 ` Linus Walleij 2018-09-20 18:15 ` Stefan Agner 1 sibling, 1 reply; 6+ messages in thread From: Linus Walleij @ 2018-09-20 15:16 UTC (permalink / raw) To: Stefan Agner Cc: thierry.reding@gmail.com, Jon Hunter, open list:GPIO SUBSYSTEM, linux-tegra, linux-kernel@vger.kernel.org On Tue, Sep 18, 2018 at 6:24 PM Stefan Agner <stefan@agner.ch> wrote: > 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 <stefan@agner.ch> It appears the test robot complains about this patch, so I'll wait for a v2! Yours, Linus Walleij ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] pinctrl: tegra: move probe to __init section 2018-09-20 15:16 ` Linus Walleij @ 2018-09-20 18:15 ` Stefan Agner 0 siblings, 0 replies; 6+ messages in thread From: Stefan Agner @ 2018-09-20 18:15 UTC (permalink / raw) To: Linus Walleij Cc: thierry.reding, Jon Hunter, open list:GPIO SUBSYSTEM, linux-tegra, linux-kernel On 20.09.2018 08:16, Linus Walleij wrote: > On Tue, Sep 18, 2018 at 6:24 PM Stefan Agner <stefan@agner.ch> wrote: > >> 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 <stefan@agner.ch> > > 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 > > Yours, > Linus Walleij ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe 2018-09-19 1:24 [PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe Stefan Agner 2018-09-19 1:24 ` [PATCH 2/2] pinctrl: tegra: move probe to __init section Stefan Agner @ 2018-09-20 15:15 ` Linus Walleij 1 sibling, 0 replies; 6+ messages in thread From: Linus Walleij @ 2018-09-20 15:15 UTC (permalink / raw) To: Stefan Agner Cc: thierry.reding@gmail.com, Jon Hunter, open list:GPIO SUBSYSTEM, linux-tegra, linux-kernel@vger.kernel.org On Tue, Sep 18, 2018 at 6:24 PM Stefan Agner <stefan@agner.ch> wrote: > No user of tegra_pinctrl_probe can be built as a module, hence > exporting the symbol is not necessary. Drop EXPORT_SYMBOL_GPL. > > Signed-off-by: Stefan Agner <stefan@agner.ch> Patch applied. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-09-20 18:15 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-09-19 1:24 [PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe Stefan Agner 2018-09-19 1:24 ` [PATCH 2/2] pinctrl: tegra: move probe to __init section Stefan Agner 2018-09-20 3:28 ` kbuild test robot 2018-09-20 15:16 ` Linus Walleij 2018-09-20 18:15 ` Stefan Agner 2018-09-20 15:15 ` [PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe Linus Walleij
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox