All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: Export some needed symbols at module load time
@ 2020-02-27  4:13 Baolin Wang
  2020-02-27  4:13 ` [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module Baolin Wang
  2020-02-28 23:25 ` [PATCH 1/2] pinctrl: Export some needed symbols at module load time Linus Walleij
  0 siblings, 2 replies; 10+ messages in thread
From: Baolin Wang @ 2020-02-27  4:13 UTC (permalink / raw)
  To: linus.walleij
  Cc: orsonzhai, zhang.lyra, baolin.wang7, linux-gpio, linux-kernel

Export the pin_get_name()/pinconf_generic_parse_dt_config() symbols needed
by the Spreadtrum pinctrl driver when building it as a module.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
---
 drivers/pinctrl/core.c            | 1 +
 drivers/pinctrl/pinconf-generic.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 446d84f..893b1ac 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -176,6 +176,7 @@ const char *pin_get_name(struct pinctrl_dev *pctldev, const unsigned pin)
 
 	return desc->name;
 }
+EXPORT_SYMBOL_GPL(pin_get_name);
 
 /* Deletes a range of pin descriptors */
 static void pinctrl_free_pindescs(struct pinctrl_dev *pctldev,
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 9eb8630..dfef471 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -286,6 +286,7 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
 	kfree(cfg);
 	return ret;
 }
+EXPORT_SYMBOL_GPL(pinconf_generic_parse_dt_config);
 
 int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 		struct device_node *np, struct pinctrl_map **map,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
  2020-02-27  4:13 [PATCH 1/2] pinctrl: Export some needed symbols at module load time Baolin Wang
@ 2020-02-27  4:13 ` Baolin Wang
  2020-02-28 23:26   ` Linus Walleij
  2020-02-29  0:41     ` kbuild test robot
  2020-02-28 23:25 ` [PATCH 1/2] pinctrl: Export some needed symbols at module load time Linus Walleij
  1 sibling, 2 replies; 10+ messages in thread
From: Baolin Wang @ 2020-02-27  4:13 UTC (permalink / raw)
  To: linus.walleij
  Cc: orsonzhai, zhang.lyra, baolin.wang7, linux-gpio, linux-kernel

Change the config to 'tristate' and export some symbols needed by modules
to allow the Spreadtrum pinctrl driver building into a module.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
---
 drivers/pinctrl/sprd/Kconfig        | 6 +++---
 drivers/pinctrl/sprd/pinctrl-sprd.c | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/sprd/Kconfig b/drivers/pinctrl/sprd/Kconfig
index b6c5479..c9e7f0b 100644
--- a/drivers/pinctrl/sprd/Kconfig
+++ b/drivers/pinctrl/sprd/Kconfig
@@ -4,7 +4,7 @@
 #
 
 config PINCTRL_SPRD
-	bool "Spreadtrum pinctrl driver"
+	tristate "Spreadtrum pinctrl driver"
 	depends on OF
 	depends on ARCH_SPRD || COMPILE_TEST
 	select PINMUX
@@ -15,7 +15,7 @@ config PINCTRL_SPRD
 	  Say Y here to enable Spreadtrum pinctrl driver
 
 config PINCTRL_SPRD_SC9860
-	bool "Spreadtrum SC9860 pinctrl driver"
-	depends on PINCTRL_SPRD
+	tristate "Spreadtrum SC9860 pinctrl driver"
+	select PINCTRL_SPRD
 	help
 	  Say Y here to enable Spreadtrum SC9860 pinctrl driver
diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c
index 157712ab..ea04bac 100644
--- a/drivers/pinctrl/sprd/pinctrl-sprd.c
+++ b/drivers/pinctrl/sprd/pinctrl-sprd.c
@@ -1090,6 +1090,7 @@ int sprd_pinctrl_core_probe(struct platform_device *pdev,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(sprd_pinctrl_core_probe);
 
 int sprd_pinctrl_remove(struct platform_device *pdev)
 {
@@ -1098,6 +1099,7 @@ int sprd_pinctrl_remove(struct platform_device *pdev)
 	pinctrl_unregister(sprd_pctl->pctl);
 	return 0;
 }
+EXPORT_SYMBOL_GPL(sprd_pinctrl_remove);
 
 void sprd_pinctrl_shutdown(struct platform_device *pdev)
 {
@@ -1112,6 +1114,7 @@ void sprd_pinctrl_shutdown(struct platform_device *pdev)
 		return;
 	pinctrl_select_state(pinctl, state);
 }
+EXPORT_SYMBOL_GPL(sprd_pinctrl_shutdown);
 
 MODULE_DESCRIPTION("SPREADTRUM Pin Controller Driver");
 MODULE_AUTHOR("Baolin Wang <baolin.wang@spreadtrum.com>");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] pinctrl: Export some needed symbols at module load time
  2020-02-27  4:13 [PATCH 1/2] pinctrl: Export some needed symbols at module load time Baolin Wang
  2020-02-27  4:13 ` [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module Baolin Wang
@ 2020-02-28 23:25 ` Linus Walleij
  1 sibling, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2020-02-28 23:25 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Orson Zhai, Lyra Zhang, open list:GPIO SUBSYSTEM, linux-kernel

On Thu, Feb 27, 2020 at 5:13 AM Baolin Wang <baolin.wang7@gmail.com> wrote:

> Export the pin_get_name()/pinconf_generic_parse_dt_config() symbols needed
> by the Spreadtrum pinctrl driver when building it as a module.
>
> Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
  2020-02-27  4:13 ` [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module Baolin Wang
@ 2020-02-28 23:26   ` Linus Walleij
  2020-02-29  0:41     ` kbuild test robot
  1 sibling, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2020-02-28 23:26 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Orson Zhai, Lyra Zhang, open list:GPIO SUBSYSTEM, linux-kernel

On Thu, Feb 27, 2020 at 5:14 AM Baolin Wang <baolin.wang7@gmail.com> wrote:

> Change the config to 'tristate' and export some symbols needed by modules
> to allow the Spreadtrum pinctrl driver building into a module.
>
> Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
  2020-02-27  4:13 ` [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module Baolin Wang
@ 2020-02-29  0:41     ` kbuild test robot
  2020-02-29  0:41     ` kbuild test robot
  1 sibling, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2020-02-29  0:41 UTC (permalink / raw)
  To: Baolin Wang
  Cc: kbuild-all, linus.walleij, orsonzhai, zhang.lyra, baolin.wang7,
	linux-gpio, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 7898 bytes --]

Hi Baolin,

I love your patch! Yet something to improve:

[auto build test ERROR on pinctrl/devel]
[also build test ERROR on v5.6-rc3 next-20200228]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: i386-randconfig-d003-20200229 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/pinctrl/sprd/pinctrl-sprd.c: In function 'sprd_dt_node_to_map':
>> drivers/pinctrl/sprd/pinctrl-sprd.c:282:8: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
     ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           pinconf_generic_dump_config
   cc1: some warnings being treated as errors

vim +282 drivers/pinctrl/sprd/pinctrl-sprd.c

41d32cfce1ae61 Baolin Wang 2017-08-17  241  
41d32cfce1ae61 Baolin Wang 2017-08-17  242  static int sprd_dt_node_to_map(struct pinctrl_dev *pctldev,
41d32cfce1ae61 Baolin Wang 2017-08-17  243  			       struct device_node *np,
41d32cfce1ae61 Baolin Wang 2017-08-17  244  			       struct pinctrl_map **map,
41d32cfce1ae61 Baolin Wang 2017-08-17  245  			       unsigned int *num_maps)
41d32cfce1ae61 Baolin Wang 2017-08-17  246  {
41d32cfce1ae61 Baolin Wang 2017-08-17  247  	struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
41d32cfce1ae61 Baolin Wang 2017-08-17  248  	const struct sprd_pin_group *grp;
41d32cfce1ae61 Baolin Wang 2017-08-17  249  	unsigned long *configs = NULL;
41d32cfce1ae61 Baolin Wang 2017-08-17  250  	unsigned int num_configs = 0;
41d32cfce1ae61 Baolin Wang 2017-08-17  251  	unsigned int reserved_maps = 0;
41d32cfce1ae61 Baolin Wang 2017-08-17  252  	unsigned int reserve = 0;
41d32cfce1ae61 Baolin Wang 2017-08-17  253  	const char *function;
41d32cfce1ae61 Baolin Wang 2017-08-17  254  	enum pinctrl_map_type type;
41d32cfce1ae61 Baolin Wang 2017-08-17  255  	int ret;
41d32cfce1ae61 Baolin Wang 2017-08-17  256  
41d32cfce1ae61 Baolin Wang 2017-08-17  257  	grp = sprd_pinctrl_find_group_by_name(pctl, np->name);
41d32cfce1ae61 Baolin Wang 2017-08-17  258  	if (!grp) {
41d32cfce1ae61 Baolin Wang 2017-08-17  259  		dev_err(pctl->dev, "unable to find group for node %s\n",
41d32cfce1ae61 Baolin Wang 2017-08-17  260  			of_node_full_name(np));
41d32cfce1ae61 Baolin Wang 2017-08-17  261  		return -EINVAL;
41d32cfce1ae61 Baolin Wang 2017-08-17  262  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  263  
41d32cfce1ae61 Baolin Wang 2017-08-17  264  	ret = of_property_count_strings(np, "pins");
41d32cfce1ae61 Baolin Wang 2017-08-17  265  	if (ret < 0)
41d32cfce1ae61 Baolin Wang 2017-08-17  266  		return ret;
41d32cfce1ae61 Baolin Wang 2017-08-17  267  
41d32cfce1ae61 Baolin Wang 2017-08-17  268  	if (ret == 1)
41d32cfce1ae61 Baolin Wang 2017-08-17  269  		type = PIN_MAP_TYPE_CONFIGS_PIN;
41d32cfce1ae61 Baolin Wang 2017-08-17  270  	else
41d32cfce1ae61 Baolin Wang 2017-08-17  271  		type = PIN_MAP_TYPE_CONFIGS_GROUP;
41d32cfce1ae61 Baolin Wang 2017-08-17  272  
41d32cfce1ae61 Baolin Wang 2017-08-17  273  	ret = of_property_read_string(np, "function", &function);
41d32cfce1ae61 Baolin Wang 2017-08-17  274  	if (ret < 0) {
41d32cfce1ae61 Baolin Wang 2017-08-17  275  		if (ret != -EINVAL)
41d32cfce1ae61 Baolin Wang 2017-08-17  276  			dev_err(pctl->dev,
41d32cfce1ae61 Baolin Wang 2017-08-17  277  				"%s: could not parse property function\n",
41d32cfce1ae61 Baolin Wang 2017-08-17  278  				of_node_full_name(np));
41d32cfce1ae61 Baolin Wang 2017-08-17  279  		function = NULL;
41d32cfce1ae61 Baolin Wang 2017-08-17  280  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  281  
41d32cfce1ae61 Baolin Wang 2017-08-17 @282  	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
41d32cfce1ae61 Baolin Wang 2017-08-17  283  					      &num_configs);
41d32cfce1ae61 Baolin Wang 2017-08-17  284  	if (ret < 0) {
41d32cfce1ae61 Baolin Wang 2017-08-17  285  		dev_err(pctl->dev, "%s: could not parse node property\n",
41d32cfce1ae61 Baolin Wang 2017-08-17  286  			of_node_full_name(np));
41d32cfce1ae61 Baolin Wang 2017-08-17  287  		return ret;
41d32cfce1ae61 Baolin Wang 2017-08-17  288  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  289  
41d32cfce1ae61 Baolin Wang 2017-08-17  290  	*map = NULL;
41d32cfce1ae61 Baolin Wang 2017-08-17  291  	*num_maps = 0;
41d32cfce1ae61 Baolin Wang 2017-08-17  292  
41d32cfce1ae61 Baolin Wang 2017-08-17  293  	if (function != NULL)
41d32cfce1ae61 Baolin Wang 2017-08-17  294  		reserve++;
41d32cfce1ae61 Baolin Wang 2017-08-17  295  	if (num_configs)
41d32cfce1ae61 Baolin Wang 2017-08-17  296  		reserve++;
41d32cfce1ae61 Baolin Wang 2017-08-17  297  
41d32cfce1ae61 Baolin Wang 2017-08-17  298  	ret = pinctrl_utils_reserve_map(pctldev, map, &reserved_maps,
41d32cfce1ae61 Baolin Wang 2017-08-17  299  					num_maps, reserve);
41d32cfce1ae61 Baolin Wang 2017-08-17  300  	if (ret < 0)
41d32cfce1ae61 Baolin Wang 2017-08-17  301  		goto out;
41d32cfce1ae61 Baolin Wang 2017-08-17  302  
41d32cfce1ae61 Baolin Wang 2017-08-17  303  	if (function) {
41d32cfce1ae61 Baolin Wang 2017-08-17  304  		ret = pinctrl_utils_add_map_mux(pctldev, map,
41d32cfce1ae61 Baolin Wang 2017-08-17  305  						&reserved_maps, num_maps,
41d32cfce1ae61 Baolin Wang 2017-08-17  306  						grp->name, function);
41d32cfce1ae61 Baolin Wang 2017-08-17  307  		if (ret < 0)
41d32cfce1ae61 Baolin Wang 2017-08-17  308  			goto out;
41d32cfce1ae61 Baolin Wang 2017-08-17  309  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  310  
41d32cfce1ae61 Baolin Wang 2017-08-17  311  	if (num_configs) {
41d32cfce1ae61 Baolin Wang 2017-08-17  312  		const char *group_or_pin;
41d32cfce1ae61 Baolin Wang 2017-08-17  313  		unsigned int pin_id;
41d32cfce1ae61 Baolin Wang 2017-08-17  314  
41d32cfce1ae61 Baolin Wang 2017-08-17  315  		if (type == PIN_MAP_TYPE_CONFIGS_PIN) {
41d32cfce1ae61 Baolin Wang 2017-08-17  316  			pin_id = grp->pins[0];
41d32cfce1ae61 Baolin Wang 2017-08-17  317  			group_or_pin = pin_get_name(pctldev, pin_id);
41d32cfce1ae61 Baolin Wang 2017-08-17  318  		} else {
41d32cfce1ae61 Baolin Wang 2017-08-17  319  			group_or_pin = grp->name;
41d32cfce1ae61 Baolin Wang 2017-08-17  320  		}
41d32cfce1ae61 Baolin Wang 2017-08-17  321  
41d32cfce1ae61 Baolin Wang 2017-08-17  322  		ret = pinctrl_utils_add_map_configs(pctldev, map,
41d32cfce1ae61 Baolin Wang 2017-08-17  323  						    &reserved_maps, num_maps,
41d32cfce1ae61 Baolin Wang 2017-08-17  324  						    group_or_pin, configs,
41d32cfce1ae61 Baolin Wang 2017-08-17  325  						    num_configs, type);
41d32cfce1ae61 Baolin Wang 2017-08-17  326  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  327  
41d32cfce1ae61 Baolin Wang 2017-08-17  328  out:
41d32cfce1ae61 Baolin Wang 2017-08-17  329  	kfree(configs);
41d32cfce1ae61 Baolin Wang 2017-08-17  330  	return ret;
41d32cfce1ae61 Baolin Wang 2017-08-17  331  }
41d32cfce1ae61 Baolin Wang 2017-08-17  332  

:::::: The code at line 282 was first introduced by commit
:::::: 41d32cfce1ae616413761d07986e1fb4b907e808 pinctrl: sprd: Add Spreadtrum pin control driver

:::::: TO: Baolin Wang <baolin.wang@spreadtrum.com>
:::::: CC: Linus Walleij <linus.walleij@linaro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30503 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
@ 2020-02-29  0:41     ` kbuild test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2020-02-29  0:41 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8034 bytes --]

Hi Baolin,

I love your patch! Yet something to improve:

[auto build test ERROR on pinctrl/devel]
[also build test ERROR on v5.6-rc3 next-20200228]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: i386-randconfig-d003-20200229 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/pinctrl/sprd/pinctrl-sprd.c: In function 'sprd_dt_node_to_map':
>> drivers/pinctrl/sprd/pinctrl-sprd.c:282:8: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
     ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           pinconf_generic_dump_config
   cc1: some warnings being treated as errors

vim +282 drivers/pinctrl/sprd/pinctrl-sprd.c

41d32cfce1ae61 Baolin Wang 2017-08-17  241  
41d32cfce1ae61 Baolin Wang 2017-08-17  242  static int sprd_dt_node_to_map(struct pinctrl_dev *pctldev,
41d32cfce1ae61 Baolin Wang 2017-08-17  243  			       struct device_node *np,
41d32cfce1ae61 Baolin Wang 2017-08-17  244  			       struct pinctrl_map **map,
41d32cfce1ae61 Baolin Wang 2017-08-17  245  			       unsigned int *num_maps)
41d32cfce1ae61 Baolin Wang 2017-08-17  246  {
41d32cfce1ae61 Baolin Wang 2017-08-17  247  	struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
41d32cfce1ae61 Baolin Wang 2017-08-17  248  	const struct sprd_pin_group *grp;
41d32cfce1ae61 Baolin Wang 2017-08-17  249  	unsigned long *configs = NULL;
41d32cfce1ae61 Baolin Wang 2017-08-17  250  	unsigned int num_configs = 0;
41d32cfce1ae61 Baolin Wang 2017-08-17  251  	unsigned int reserved_maps = 0;
41d32cfce1ae61 Baolin Wang 2017-08-17  252  	unsigned int reserve = 0;
41d32cfce1ae61 Baolin Wang 2017-08-17  253  	const char *function;
41d32cfce1ae61 Baolin Wang 2017-08-17  254  	enum pinctrl_map_type type;
41d32cfce1ae61 Baolin Wang 2017-08-17  255  	int ret;
41d32cfce1ae61 Baolin Wang 2017-08-17  256  
41d32cfce1ae61 Baolin Wang 2017-08-17  257  	grp = sprd_pinctrl_find_group_by_name(pctl, np->name);
41d32cfce1ae61 Baolin Wang 2017-08-17  258  	if (!grp) {
41d32cfce1ae61 Baolin Wang 2017-08-17  259  		dev_err(pctl->dev, "unable to find group for node %s\n",
41d32cfce1ae61 Baolin Wang 2017-08-17  260  			of_node_full_name(np));
41d32cfce1ae61 Baolin Wang 2017-08-17  261  		return -EINVAL;
41d32cfce1ae61 Baolin Wang 2017-08-17  262  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  263  
41d32cfce1ae61 Baolin Wang 2017-08-17  264  	ret = of_property_count_strings(np, "pins");
41d32cfce1ae61 Baolin Wang 2017-08-17  265  	if (ret < 0)
41d32cfce1ae61 Baolin Wang 2017-08-17  266  		return ret;
41d32cfce1ae61 Baolin Wang 2017-08-17  267  
41d32cfce1ae61 Baolin Wang 2017-08-17  268  	if (ret == 1)
41d32cfce1ae61 Baolin Wang 2017-08-17  269  		type = PIN_MAP_TYPE_CONFIGS_PIN;
41d32cfce1ae61 Baolin Wang 2017-08-17  270  	else
41d32cfce1ae61 Baolin Wang 2017-08-17  271  		type = PIN_MAP_TYPE_CONFIGS_GROUP;
41d32cfce1ae61 Baolin Wang 2017-08-17  272  
41d32cfce1ae61 Baolin Wang 2017-08-17  273  	ret = of_property_read_string(np, "function", &function);
41d32cfce1ae61 Baolin Wang 2017-08-17  274  	if (ret < 0) {
41d32cfce1ae61 Baolin Wang 2017-08-17  275  		if (ret != -EINVAL)
41d32cfce1ae61 Baolin Wang 2017-08-17  276  			dev_err(pctl->dev,
41d32cfce1ae61 Baolin Wang 2017-08-17  277  				"%s: could not parse property function\n",
41d32cfce1ae61 Baolin Wang 2017-08-17  278  				of_node_full_name(np));
41d32cfce1ae61 Baolin Wang 2017-08-17  279  		function = NULL;
41d32cfce1ae61 Baolin Wang 2017-08-17  280  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  281  
41d32cfce1ae61 Baolin Wang 2017-08-17 @282  	ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
41d32cfce1ae61 Baolin Wang 2017-08-17  283  					      &num_configs);
41d32cfce1ae61 Baolin Wang 2017-08-17  284  	if (ret < 0) {
41d32cfce1ae61 Baolin Wang 2017-08-17  285  		dev_err(pctl->dev, "%s: could not parse node property\n",
41d32cfce1ae61 Baolin Wang 2017-08-17  286  			of_node_full_name(np));
41d32cfce1ae61 Baolin Wang 2017-08-17  287  		return ret;
41d32cfce1ae61 Baolin Wang 2017-08-17  288  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  289  
41d32cfce1ae61 Baolin Wang 2017-08-17  290  	*map = NULL;
41d32cfce1ae61 Baolin Wang 2017-08-17  291  	*num_maps = 0;
41d32cfce1ae61 Baolin Wang 2017-08-17  292  
41d32cfce1ae61 Baolin Wang 2017-08-17  293  	if (function != NULL)
41d32cfce1ae61 Baolin Wang 2017-08-17  294  		reserve++;
41d32cfce1ae61 Baolin Wang 2017-08-17  295  	if (num_configs)
41d32cfce1ae61 Baolin Wang 2017-08-17  296  		reserve++;
41d32cfce1ae61 Baolin Wang 2017-08-17  297  
41d32cfce1ae61 Baolin Wang 2017-08-17  298  	ret = pinctrl_utils_reserve_map(pctldev, map, &reserved_maps,
41d32cfce1ae61 Baolin Wang 2017-08-17  299  					num_maps, reserve);
41d32cfce1ae61 Baolin Wang 2017-08-17  300  	if (ret < 0)
41d32cfce1ae61 Baolin Wang 2017-08-17  301  		goto out;
41d32cfce1ae61 Baolin Wang 2017-08-17  302  
41d32cfce1ae61 Baolin Wang 2017-08-17  303  	if (function) {
41d32cfce1ae61 Baolin Wang 2017-08-17  304  		ret = pinctrl_utils_add_map_mux(pctldev, map,
41d32cfce1ae61 Baolin Wang 2017-08-17  305  						&reserved_maps, num_maps,
41d32cfce1ae61 Baolin Wang 2017-08-17  306  						grp->name, function);
41d32cfce1ae61 Baolin Wang 2017-08-17  307  		if (ret < 0)
41d32cfce1ae61 Baolin Wang 2017-08-17  308  			goto out;
41d32cfce1ae61 Baolin Wang 2017-08-17  309  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  310  
41d32cfce1ae61 Baolin Wang 2017-08-17  311  	if (num_configs) {
41d32cfce1ae61 Baolin Wang 2017-08-17  312  		const char *group_or_pin;
41d32cfce1ae61 Baolin Wang 2017-08-17  313  		unsigned int pin_id;
41d32cfce1ae61 Baolin Wang 2017-08-17  314  
41d32cfce1ae61 Baolin Wang 2017-08-17  315  		if (type == PIN_MAP_TYPE_CONFIGS_PIN) {
41d32cfce1ae61 Baolin Wang 2017-08-17  316  			pin_id = grp->pins[0];
41d32cfce1ae61 Baolin Wang 2017-08-17  317  			group_or_pin = pin_get_name(pctldev, pin_id);
41d32cfce1ae61 Baolin Wang 2017-08-17  318  		} else {
41d32cfce1ae61 Baolin Wang 2017-08-17  319  			group_or_pin = grp->name;
41d32cfce1ae61 Baolin Wang 2017-08-17  320  		}
41d32cfce1ae61 Baolin Wang 2017-08-17  321  
41d32cfce1ae61 Baolin Wang 2017-08-17  322  		ret = pinctrl_utils_add_map_configs(pctldev, map,
41d32cfce1ae61 Baolin Wang 2017-08-17  323  						    &reserved_maps, num_maps,
41d32cfce1ae61 Baolin Wang 2017-08-17  324  						    group_or_pin, configs,
41d32cfce1ae61 Baolin Wang 2017-08-17  325  						    num_configs, type);
41d32cfce1ae61 Baolin Wang 2017-08-17  326  	}
41d32cfce1ae61 Baolin Wang 2017-08-17  327  
41d32cfce1ae61 Baolin Wang 2017-08-17  328  out:
41d32cfce1ae61 Baolin Wang 2017-08-17  329  	kfree(configs);
41d32cfce1ae61 Baolin Wang 2017-08-17  330  	return ret;
41d32cfce1ae61 Baolin Wang 2017-08-17  331  }
41d32cfce1ae61 Baolin Wang 2017-08-17  332  

:::::: The code at line 282 was first introduced by commit
:::::: 41d32cfce1ae616413761d07986e1fb4b907e808 pinctrl: sprd: Add Spreadtrum pin control driver

:::::: TO: Baolin Wang <baolin.wang@spreadtrum.com>
:::::: CC: Linus Walleij <linus.walleij@linaro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30503 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
  2020-02-29  0:41     ` kbuild test robot
  (?)
@ 2020-03-02  2:33     ` Baolin Wang
  2020-03-03  6:42         ` Rong Chen
  -1 siblings, 1 reply; 10+ messages in thread
From: Baolin Wang @ 2020-03-02  2:33 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, Linus Walleij, Orson Zhai, Chunyan Zhang, linux-gpio, LKML

Hi

On Sat, Feb 29, 2020 at 8:41 AM kbuild test robot <lkp@intel.com> wrote:
>
> Hi Baolin,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on pinctrl/devel]
> [also build test ERROR on v5.6-rc3 next-20200228]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url:    https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
> config: i386-randconfig-d003-20200229 (attached as .config)
> compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>    drivers/pinctrl/sprd/pinctrl-sprd.c: In function 'sprd_dt_node_to_map':
> >> drivers/pinctrl/sprd/pinctrl-sprd.c:282:8: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
>      ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>            pinconf_generic_dump_config
>    cc1: some warnings being treated as errors

I followed your attached configuration, but I can not reproduce your
building error. Did I miss anything else? Thanks.

CONFIG_PINCTRL=y
CONFIG_PINMUX=y
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
CONFIG_PINCONF=y
CONFIG_GENERIC_PINCONF=y
CONFIG_PINCTRL_SPRD=y
CONFIG_PINCTRL_SPRD_SC9860=y

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
  2020-03-02  2:33     ` Baolin Wang
@ 2020-03-03  6:42         ` Rong Chen
  0 siblings, 0 replies; 10+ messages in thread
From: Rong Chen @ 2020-03-03  6:42 UTC (permalink / raw)
  To: Baolin Wang, kbuild test robot
  Cc: kbuild-all, Linus Walleij, Orson Zhai, Chunyan Zhang, linux-gpio, LKML



On 3/2/20 10:33 AM, Baolin Wang wrote:
> Hi
>
> On Sat, Feb 29, 2020 at 8:41 AM kbuild test robot <lkp@intel.com> wrote:
>> Hi Baolin,
>>
>> I love your patch! Yet something to improve:
>>
>> [auto build test ERROR on pinctrl/devel]
>> [also build test ERROR on v5.6-rc3 next-20200228]
>> [if your patch is applied to the wrong git tree, please drop us a note to help
>> improve the system. BTW, we also suggest to use '--base' option to specify the
>> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>>
>> url:    https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948
>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
>> config: i386-randconfig-d003-20200229 (attached as .config)
>> compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
>> reproduce:
>>          # save the attached .config to linux build tree
>>          make ARCH=i386
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>     drivers/pinctrl/sprd/pinctrl-sprd.c: In function 'sprd_dt_node_to_map':
>>>> drivers/pinctrl/sprd/pinctrl-sprd.c:282:8: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
>>       ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>>             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>             pinconf_generic_dump_config
>>     cc1: some warnings being treated as errors
> I followed your attached configuration, but I can not reproduce your
> building error. Did I miss anything else? Thanks.
>
> CONFIG_PINCTRL=y
> CONFIG_PINMUX=y
> CONFIG_GENERIC_PINMUX_FUNCTIONS=y
> CONFIG_PINCONF=y
> CONFIG_GENERIC_PINCONF=y
> CONFIG_PINCTRL_SPRD=y
> CONFIG_PINCTRL_SPRD_SC9860=y
>

Hi Baolin,

We can reproduce this error with attached config and our branch 
"https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948",
could you try again?

Best Regards,
Rong Chen

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
@ 2020-03-03  6:42         ` Rong Chen
  0 siblings, 0 replies; 10+ messages in thread
From: Rong Chen @ 2020-03-03  6:42 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2220 bytes --]



On 3/2/20 10:33 AM, Baolin Wang wrote:
> Hi
>
> On Sat, Feb 29, 2020 at 8:41 AM kbuild test robot <lkp@intel.com> wrote:
>> Hi Baolin,
>>
>> I love your patch! Yet something to improve:
>>
>> [auto build test ERROR on pinctrl/devel]
>> [also build test ERROR on v5.6-rc3 next-20200228]
>> [if your patch is applied to the wrong git tree, please drop us a note to help
>> improve the system. BTW, we also suggest to use '--base' option to specify the
>> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>>
>> url:    https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948
>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
>> config: i386-randconfig-d003-20200229 (attached as .config)
>> compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
>> reproduce:
>>          # save the attached .config to linux build tree
>>          make ARCH=i386
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>     drivers/pinctrl/sprd/pinctrl-sprd.c: In function 'sprd_dt_node_to_map':
>>>> drivers/pinctrl/sprd/pinctrl-sprd.c:282:8: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
>>       ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
>>             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>             pinconf_generic_dump_config
>>     cc1: some warnings being treated as errors
> I followed your attached configuration, but I can not reproduce your
> building error. Did I miss anything else? Thanks.
>
> CONFIG_PINCTRL=y
> CONFIG_PINMUX=y
> CONFIG_GENERIC_PINMUX_FUNCTIONS=y
> CONFIG_PINCONF=y
> CONFIG_GENERIC_PINCONF=y
> CONFIG_PINCTRL_SPRD=y
> CONFIG_PINCTRL_SPRD_SC9860=y
>

Hi Baolin,

We can reproduce this error with attached config and our branch 
"https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948",
could you try again?

Best Regards,
Rong Chen

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
  2020-03-03  6:42         ` Rong Chen
  (?)
@ 2020-03-03  6:48         ` Baolin Wang
  -1 siblings, 0 replies; 10+ messages in thread
From: Baolin Wang @ 2020-03-03  6:48 UTC (permalink / raw)
  To: Rong Chen
  Cc: kbuild test robot, kbuild-all, Linus Walleij, Orson Zhai,
	Chunyan Zhang, linux-gpio, LKML

Hi Rong,

On Tue, Mar 3, 2020 at 2:43 PM Rong Chen <rong.a.chen@intel.com> wrote:
>
>
>
> On 3/2/20 10:33 AM, Baolin Wang wrote:
> > Hi
> >
> > On Sat, Feb 29, 2020 at 8:41 AM kbuild test robot <lkp@intel.com> wrote:
> >> Hi Baolin,
> >>
> >> I love your patch! Yet something to improve:
> >>
> >> [auto build test ERROR on pinctrl/devel]
> >> [also build test ERROR on v5.6-rc3 next-20200228]
> >> [if your patch is applied to the wrong git tree, please drop us a note to help
> >> improve the system. BTW, we also suggest to use '--base' option to specify the
> >> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
> >>
> >> url:    https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948
> >> base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
> >> config: i386-randconfig-d003-20200229 (attached as .config)
> >> compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
> >> reproduce:
> >>          # save the attached .config to linux build tree
> >>          make ARCH=i386
> >>
> >> If you fix the issue, kindly add following tag
> >> Reported-by: kbuild test robot <lkp@intel.com>
> >>
> >> All errors (new ones prefixed by >>):
> >>
> >>     drivers/pinctrl/sprd/pinctrl-sprd.c: In function 'sprd_dt_node_to_map':
> >>>> drivers/pinctrl/sprd/pinctrl-sprd.c:282:8: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
> >>       ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
> >>             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>             pinconf_generic_dump_config
> >>     cc1: some warnings being treated as errors
> > I followed your attached configuration, but I can not reproduce your
> > building error. Did I miss anything else? Thanks.
> >
> > CONFIG_PINCTRL=y
> > CONFIG_PINMUX=y
> > CONFIG_GENERIC_PINMUX_FUNCTIONS=y
> > CONFIG_PINCONF=y
> > CONFIG_GENERIC_PINCONF=y
> > CONFIG_PINCTRL_SPRD=y
> > CONFIG_PINCTRL_SPRD_SC9860=y
> >
>
> Hi Baolin,
>
> We can reproduce this error with attached config and our branch
> "https://github.com/0day-ci/linux/commits/Baolin-Wang/pinctrl-Export-some-needed-symbols-at-module-load-time/20200227-121948",
> could you try again?

I can reproduce the warning on X86 platform now, and I've already sent
out a patch to fix it. Thanks
https://lkml.org/lkml/2020/3/2/1551

-- 
Baolin Wang

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-03-03  6:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27  4:13 [PATCH 1/2] pinctrl: Export some needed symbols at module load time Baolin Wang
2020-02-27  4:13 ` [PATCH 2/2] pinctrl: sprd: Allow the SPRD pinctrl driver building into a module Baolin Wang
2020-02-28 23:26   ` Linus Walleij
2020-02-29  0:41   ` kbuild test robot
2020-02-29  0:41     ` kbuild test robot
2020-03-02  2:33     ` Baolin Wang
2020-03-03  6:42       ` Rong Chen
2020-03-03  6:42         ` Rong Chen
2020-03-03  6:48         ` Baolin Wang
2020-02-28 23:25 ` [PATCH 1/2] pinctrl: Export some needed symbols at module load time Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.