* [spi:topic/pxa2xx 1/1] drivers//spi/spi-pxa2xx.c:1240:3: error: implicit declaration of function 'gpiod_free'
@ 2017-12-22 10:29 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2017-12-22 10:29 UTC (permalink / raw)
To: Rasmus Villemoes
Cc: kbuild-all-JC7UmRfGjtg, linux-spi-u79uwXL29TY76Z2rM5mHXA, Mark Brown
[-- Attachment #1: Type: text/plain, Size: 2770 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git topic/pxa2xx
head: 221886646f75964ca31cf60f1811b2c9c4e965a5
commit: 221886646f75964ca31cf60f1811b2c9c4e965a5 [1/1] spi: pxa2xx: avoid redundant gpio_to_desc(desc_to_gpio()) round-trip
config: x86_64-randconfig-r0-12221401 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 221886646f75964ca31cf60f1811b2c9c4e965a5
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers//spi/spi-pxa2xx.c: In function 'setup_cs':
>> drivers//spi/spi-pxa2xx.c:1240:3: error: implicit declaration of function 'gpiod_free' [-Werror=implicit-function-declaration]
gpiod_free(chip->gpiod_cs);
^~~~~~~~~~
cc1: some warnings being treated as errors
vim +/gpiod_free +1240 drivers//spi/spi-pxa2xx.c
1211
1212 static int setup_cs(struct spi_device *spi, struct chip_data *chip,
1213 struct pxa2xx_spi_chip *chip_info)
1214 {
1215 struct driver_data *drv_data = spi_master_get_devdata(spi->master);
1216 struct gpio_desc *gpiod;
1217 int err = 0;
1218
1219 if (chip == NULL)
1220 return 0;
1221
1222 if (drv_data->cs_gpiods) {
1223 gpiod = drv_data->cs_gpiods[spi->chip_select];
1224 if (gpiod) {
1225 chip->gpiod_cs = gpiod;
1226 chip->gpio_cs_inverted = spi->mode & SPI_CS_HIGH;
1227 gpiod_set_value(gpiod, chip->gpio_cs_inverted);
1228 }
1229
1230 return 0;
1231 }
1232
1233 if (chip_info == NULL)
1234 return 0;
1235
1236 /* NOTE: setup() can be called multiple times, possibly with
1237 * different chip_info, release previously requested GPIO
1238 */
1239 if (chip->gpiod_cs) {
> 1240 gpiod_free(chip->gpiod_cs);
1241 chip->gpiod_cs = NULL;
1242 }
1243
1244 /* If (*cs_control) is provided, ignore GPIO chip select */
1245 if (chip_info->cs_control) {
1246 chip->cs_control = chip_info->cs_control;
1247 return 0;
1248 }
1249
1250 if (gpio_is_valid(chip_info->gpio_cs)) {
1251 err = gpio_request(chip_info->gpio_cs, "SPI_CS");
1252 if (err) {
1253 dev_err(&spi->dev, "failed to request chip select GPIO%d\n",
1254 chip_info->gpio_cs);
1255 return err;
1256 }
1257
1258 gpiod = gpio_to_desc(chip_info->gpio_cs);
1259 chip->gpiod_cs = gpiod;
1260 chip->gpio_cs_inverted = spi->mode & SPI_CS_HIGH;
1261
1262 err = gpiod_direction_output(gpiod, !chip->gpio_cs_inverted);
1263 }
1264
1265 return err;
1266 }
1267
---
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: 25008 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-22 10:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-22 10:29 [spi:topic/pxa2xx 1/1] drivers//spi/spi-pxa2xx.c:1240:3: error: implicit declaration of function 'gpiod_free' kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).