Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on linusw-pinctrl/devel]
[cannot apply to geert-renesas-drivers/renesas-pinctrl v5.16-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Andy-Shevchenko/pinctrl-Get-rid-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: ia64-randconfig-r032-20211213
(
https://download.01.org/0day-ci/archive/20211214/202112140202.rfjJQkD9-lk...)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/09301bc05d31cbebbea459be85ce973a0...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Andy-Shevchenko/pinctrl-Get-rid-of-duplicate-of_node-assignment-in-the-drivers/20211214-004129
git checkout 09301bc05d31cbebbea459be85ce973a065379d1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=ia64 SHELL=/bin/bash drivers/pinctrl/cirrus/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/pinctrl/cirrus/pinctrl-madera-core.c: In function 'madera_pin_probe':
> drivers/pinctrl/cirrus/pinctrl-madera-core.c:1007:37: error:
implicit declaration of function 'dev_fwnode'; did you mean 'dev_of_node'?
[-Werror=implicit-function-declaration]
1007 |
device_set_node(&pdev->dev, dev_fwnode(pdev->dev.parent));
| ^~~~~~~~~~
| dev_of_node
> drivers/pinctrl/cirrus/pinctrl-madera-core.c:1007:37: warning:
passing argument 2 of 'device_set_node' makes pointer from integer without a cast
[-Wint-conversion]
1007 | device_set_node(&pdev->dev,
dev_fwnode(pdev->dev.parent));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from include/linux/platform_device.h:13,
from drivers/pinctrl/cirrus/pinctrl-madera-core.c:10:
include/linux/device.h:854:64: note: expected 'struct fwnode_handle *' but
argument is of type 'int'
854 | void device_set_node(struct device *dev, struct fwnode_handle *fwnode);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
cc1: some warnings being treated as errors
vim +1007 drivers/pinctrl/cirrus/pinctrl-madera-core.c
994
995 static int madera_pin_probe(struct platform_device *pdev)
996 {
997 struct madera *madera = dev_get_drvdata(pdev->dev.parent);
998 const struct madera_pdata *pdata = &madera->pdata;
999 struct madera_pin_private *priv;
1000 int ret;
1001
1002 BUILD_BUG_ON(ARRAY_SIZE(madera_pin_single_group_names) !=
1003 ARRAY_SIZE(madera_pin_single_group_pins));
1004
1005 dev_dbg(&pdev->dev, "%s\n", __func__);
1006
1007 device_set_node(&pdev->dev,
dev_fwnode(pdev->dev.parent));
1008
1009 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
1010 if (!priv)
1011 return -ENOMEM;
1012
1013 priv->dev = &pdev->dev;
1014 priv->madera = madera;
1015
1016 switch (madera->type) {
1017 case CS47L15:
1018 if (IS_ENABLED(CONFIG_PINCTRL_CS47L15))
1019 priv->chip = &cs47l15_pin_chip;
1020 break;
1021 case CS47L35:
1022 if (IS_ENABLED(CONFIG_PINCTRL_CS47L35))
1023 priv->chip = &cs47l35_pin_chip;
1024 break;
1025 case CS47L85:
1026 case WM1840:
1027 if (IS_ENABLED(CONFIG_PINCTRL_CS47L85))
1028 priv->chip = &cs47l85_pin_chip;
1029 break;
1030 case CS47L90:
1031 case CS47L91:
1032 if (IS_ENABLED(CONFIG_PINCTRL_CS47L90))
1033 priv->chip = &cs47l90_pin_chip;
1034 break;
1035 case CS42L92:
1036 case CS47L92:
1037 case CS47L93:
1038 if (IS_ENABLED(CONFIG_PINCTRL_CS47L92))
1039 priv->chip = &cs47l92_pin_chip;
1040 break;
1041 default:
1042 break;
1043 }
1044
1045 if (!priv->chip)
1046 return -ENODEV;
1047
1048 madera_pin_desc.npins = priv->chip->n_pins;
1049
1050 ret = devm_pinctrl_register_and_init(&pdev->dev,
1051 &madera_pin_desc,
1052 priv,
1053 &priv->pctl);
1054 if (ret) {
1055 dev_err(priv->dev, "Failed pinctrl register (%d)\n", ret);
1056 return ret;
1057 }
1058
1059 /* if the configuration is provided through pdata, apply it */
1060 if (pdata->gpio_configs) {
1061 ret = pinctrl_register_mappings(pdata->gpio_configs,
1062 pdata->n_gpio_configs);
1063 if (ret) {
1064 dev_err(priv->dev,
1065 "Failed to register pdata mappings (%d)\n",
1066 ret);
1067 return ret;
1068 }
1069 }
1070
1071 ret = pinctrl_enable(priv->pctl);
1072 if (ret) {
1073 dev_err(priv->dev, "Failed to enable pinctrl (%d)\n", ret);
1074 return ret;
1075 }
1076
1077 platform_set_drvdata(pdev, priv);
1078
1079 dev_dbg(priv->dev, "pinctrl probed ok\n");
1080
1081 return 0;
1082 }
1083
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org