[thierryreding:for-5.19/work 141/141] drivers/gpio/gpio-tegra186.c:170:15: error: implicit declaration of function 'pinctrl_gpio_direction_input'; did you mean 'tegra186_gpio_direction_input'?

From: kernel test robot
Date: Wed Apr 27 2022 - 05:03:00 EST


tree: https://github.com/thierryreding/linux for-5.19/work
head: a39ec325554470289e8384e30d06a22960d1dd7b
commit: a39ec325554470289e8384e30d06a22960d1dd7b [141/141] WIP
config: xtensa-randconfig-r004-20220425 (https://download.01.org/0day-ci/archive/20220427/202204271656.UqVmYgYg-lkp@xxxxxxxxx/config)
compiler: xtensa-linux-gcc (GCC) 11.3.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/thierryreding/linux/commit/a39ec325554470289e8384e30d06a22960d1dd7b
git remote add thierryreding https://github.com/thierryreding/linux
git fetch --no-tags thierryreding for-5.19/work
git checkout a39ec325554470289e8384e30d06a22960d1dd7b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=xtensa SHELL=/bin/bash drivers/gpio/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/gpio/gpio-tegra186.c: In function 'tegra186_gpio_direction_input':
>> drivers/gpio/gpio-tegra186.c:170:15: error: implicit declaration of function 'pinctrl_gpio_direction_input'; did you mean 'tegra186_gpio_direction_input'? [-Werror=implicit-function-declaration]
170 | err = pinctrl_gpio_direction_input(chip->base + offset);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| tegra186_gpio_direction_input
cc1: some warnings being treated as errors


vim +170 drivers/gpio/gpio-tegra186.c

145
146 static int tegra186_gpio_direction_input(struct gpio_chip *chip,
147 unsigned int offset)
148 {
149 struct tegra_gpio *gpio = gpiochip_get_data(chip);
150 void __iomem *base;
151 u32 value;
152 int err;
153
154 dev_info(gpio->gpio.parent, "> %s(chip=%px, offset=%u)\n", __func__, chip, offset);
155 dev_info(gpio->gpio.parent, " GPIO: %s\n", gpio->gpio.names[offset]);
156
157 base = tegra186_gpio_get_base(gpio, offset);
158 if (WARN_ON(base == NULL))
159 return -ENODEV;
160
161 value = readl(base + TEGRA186_GPIO_OUTPUT_CONTROL);
162 value |= TEGRA186_GPIO_OUTPUT_CONTROL_FLOATED;
163 writel(value, base + TEGRA186_GPIO_OUTPUT_CONTROL);
164
165 value = readl(base + TEGRA186_GPIO_ENABLE_CONFIG);
166 value |= TEGRA186_GPIO_ENABLE_CONFIG_ENABLE;
167 value &= ~TEGRA186_GPIO_ENABLE_CONFIG_OUT;
168 writel(value, base + TEGRA186_GPIO_ENABLE_CONFIG);
169
> 170 err = pinctrl_gpio_direction_input(chip->base + offset);
171 if (err < 0)
172 dev_err(gpio->gpio.parent, "failed to set pinctrl input direction of GPIO %u: %d\n",
173 chip->base + offset, err);
174
175 dev_info(gpio->gpio.parent, "< %s() = %d\n", __func__, err);
176 return err;
177 }
178

--
0-DAY CI Kernel Test Service
https://01.org/lkp