[gpio:gpio-driver-h 17/25] drivers//gpio/gpio-sch311x.c:299:28: error: 'sch311x_set_config' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-driver-h
head:   915c04be5ba60b3e285f361a38c2c85f10d934d9
commit: 96ecd5bccd38f0eae598323689498937f96a0fa7 [17/25] gpio: sch311x: Implement open drain support
config: i386-randconfig-s1-201825 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        git checkout 96ecd5bccd38f0eae598323689498937f96a0fa7
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers//gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
   drivers//gpio/gpio-sch311x.c:298:31: error: 'sch311x_get_direction' undeclared (first use in this function)
      block->chip.get_direction = sch311x_get_direction;
                                  ^~~~~~~~~~~~~~~~~~~~~
   drivers//gpio/gpio-sch311x.c:298:31: note: each undeclared identifier is reported only once for each function it appears in
>> drivers//gpio/gpio-sch311x.c:299:28: error: 'sch311x_set_config' undeclared (first use in this function)
      block->chip.set_config = sch311x_set_config;
                               ^~~~~~~~~~~~~~~~~~
   At top level:
   drivers//gpio/gpio-sch311x.c:238:12: warning: 'sch311x_gpio_set_config' defined but not used [-Wunused-function]
    static int sch311x_gpio_set_config(struct gpio_chip *chip, unsigned offset,
               ^~~~~~~~~~~~~~~~~~~~~~~
   drivers//gpio/gpio-sch311x.c:226:12: warning: 'sch311x_gpio_get_direction' defined but not used [-Wunused-function]
    static int sch311x_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/sch311x_set_config +299 drivers//gpio/gpio-sch311x.c

   265	
   266	static int sch311x_gpio_probe(struct platform_device *pdev)
   267	{
   268		struct sch311x_pdev_data *pdata = dev_get_platdata(&pdev->dev);
   269		struct sch311x_gpio_priv *priv;
   270		struct sch311x_gpio_block *block;
   271		int err, i;
   272	
   273		/* we can register all GPIO data registers at once */
   274		if (!devm_request_region(&pdev->dev, pdata->runtime_reg + GP1, 6,
   275			DRV_NAME)) {
   276			dev_err(&pdev->dev, "Failed to request region 0x%04x-0x%04x.\n",
   277				pdata->runtime_reg + GP1, pdata->runtime_reg + GP1 + 5);
   278			return -EBUSY;
   279		}
   280	
   281		priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
   282		if (!priv)
   283			return -ENOMEM;
   284	
   285		platform_set_drvdata(pdev, priv);
   286	
   287		for (i = 0; i < ARRAY_SIZE(priv->blocks); i++) {
   288			block = &priv->blocks[i];
   289	
   290			spin_lock_init(&block->lock);
   291	
   292			block->chip.label = DRV_NAME;
   293			block->chip.owner = THIS_MODULE;
   294			block->chip.request = sch311x_gpio_request;
   295			block->chip.free = sch311x_gpio_free;
   296			block->chip.direction_input = sch311x_gpio_direction_in;
   297			block->chip.direction_output = sch311x_gpio_direction_out;
 > 298			block->chip.get_direction = sch311x_get_direction;
 > 299			block->chip.set_config = sch311x_set_config;
   300			block->chip.get = sch311x_gpio_get;
   301			block->chip.set = sch311x_gpio_set;
   302			block->chip.ngpio = 8;
   303			block->chip.parent = &pdev->dev;
   304			block->chip.base = sch311x_gpio_blocks[i].base;
   305			block->config_regs = sch311x_gpio_blocks[i].config_regs;
   306			block->data_reg = sch311x_gpio_blocks[i].data_reg;
   307			block->runtime_reg = pdata->runtime_reg;
   308	
   309			err = gpiochip_add_data(&block->chip, block);
   310			if (err < 0) {
   311				dev_err(&pdev->dev,
   312					"Could not register gpiochip, %d\n", err);
   313				goto exit_err;
   314			}
   315			dev_info(&pdev->dev,
   316				 "SMSC SCH311x GPIO block %d registered.\n", i);
   317		}
   318	
   319		return 0;
   320	
   321	exit_err:
   322		/* release already registered chips */
   323		for (--i; i >= 0; i--)
   324			gpiochip_remove(&priv->blocks[i].chip);
   325		return err;
   326	}
   327	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux