All of lore.kernel.org
 help / color / mirror / Atom feed
* [stffrdhrn:starfive-bad-dcache-flush 2/39] drivers/gpio/gpio-starfive-vic.c:522:8: error: implicit declaration of function 'devm_request_irq'; did you mean 'can_request_irq'?
@ 2021-05-22 12:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-22 12:24 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/stffrdhrn/linux.git starfive-bad-dcache-flush
head:   a5c948a9cc2b8944f00056c067fb7bde19b34843
commit: 4482cc40078eac952205e48d9937419f5808d6a2 [2/39] gpio: starfive-vic: Add StarFive VIC GPIO driver
config: nios2-randconfig-s032-20210522 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/stffrdhrn/linux/commit/4482cc40078eac952205e48d9937419f5808d6a2
        git remote add stffrdhrn https://github.com/stffrdhrn/linux.git
        git fetch --no-tags stffrdhrn starfive-bad-dcache-flush
        git checkout 4482cc40078eac952205e48d9937419f5808d6a2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=nios2 

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

All error/warnings (new ones prefixed by >>):

>> drivers/gpio/gpio-starfive-vic.c:348:6: warning: no previous prototype for 'sf_vic_gpio_dout_reverse' [-Wmissing-prototypes]
     348 | void sf_vic_gpio_dout_reverse(int gpio, int en)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-starfive-vic.c:367:6: warning: no previous prototype for 'sf_vic_gpio_dout_value' [-Wmissing-prototypes]
     367 | void sf_vic_gpio_dout_value(int gpio, int v)
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-starfive-vic.c:385:6: warning: no previous prototype for 'sf_vic_gpio_dout_low' [-Wmissing-prototypes]
     385 | void sf_vic_gpio_dout_low(int gpio)
         |      ^~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-starfive-vic.c:391:6: warning: no previous prototype for 'sf_vic_gpio_dout_high' [-Wmissing-prototypes]
     391 | void sf_vic_gpio_dout_high(int gpio)
         |      ^~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-starfive-vic.c:397:6: warning: no previous prototype for 'sf_vic_gpio_doen_reverse' [-Wmissing-prototypes]
     397 | void sf_vic_gpio_doen_reverse(int gpio, int en)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-starfive-vic.c:416:6: warning: no previous prototype for 'sf_vic_gpio_doen_value' [-Wmissing-prototypes]
     416 | void sf_vic_gpio_doen_value(int gpio, int v)
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-starfive-vic.c:435:6: warning: no previous prototype for 'sf_vic_gpio_doen_low' [-Wmissing-prototypes]
     435 | void sf_vic_gpio_doen_low(int gpio)
         |      ^~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-starfive-vic.c:441:6: warning: no previous prototype for 'sf_vic_gpio_doen_high' [-Wmissing-prototypes]
     441 | void sf_vic_gpio_doen_high(int gpio)
         |      ^~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-starfive-vic.c:447:6: warning: no previous prototype for 'sf_vic_gpio_manual' [-Wmissing-prototypes]
     447 | void sf_vic_gpio_manual(int offset, int v)
         |      ^~~~~~~~~~~~~~~~~~
   drivers/gpio/gpio-starfive-vic.c: In function 'starfive_gpio_probe':
>> drivers/gpio/gpio-starfive-vic.c:522:8: error: implicit declaration of function 'devm_request_irq'; did you mean 'can_request_irq'? [-Werror=implicit-function-declaration]
     522 |  ret = devm_request_irq(dev, irq, starfive_irq_handler, IRQF_SHARED,
         |        ^~~~~~~~~~~~~~~~
         |        can_request_irq
>> drivers/gpio/gpio-starfive-vic.c:522:57: error: 'IRQF_SHARED' undeclared (first use in this function); did you mean 'VM_SHARED'?
     522 |  ret = devm_request_irq(dev, irq, starfive_irq_handler, IRQF_SHARED,
         |                                                         ^~~~~~~~~~~
         |                                                         VM_SHARED
   drivers/gpio/gpio-starfive-vic.c:522:57: note: each undeclared identifier is reported only once for each function it appears in
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
   Depends on TTY && HAS_IOMEM
   Selected by
   - EARLY_PRINTK


vim +522 drivers/gpio/gpio-starfive-vic.c

   347	
 > 348	void sf_vic_gpio_dout_reverse(int gpio, int en)
   349	{
   350		unsigned int value;
   351		int offset;
   352	
   353		if (!gpio_base)
   354			return;
   355	
   356		offset = gpio * 8 + GPIO_DOUT_X_REG;
   357	
   358		spin_lock(&sfg_lock);
   359		value = ioread32(gpio_base + offset);
   360		value &= ~(0x1 << 31);
   361		value |= (en & 0x1) << 31;
   362		iowrite32(value, gpio_base + offset);
   363		spin_unlock(&sfg_lock);
   364	}
   365	EXPORT_SYMBOL_GPL(sf_vic_gpio_dout_reverse);
   366	
 > 367	void sf_vic_gpio_dout_value(int gpio, int v)
   368	{
   369		unsigned int value;
   370		int offset;
   371	
   372		if (!gpio_base)
   373			return;
   374	
   375		offset = gpio * 8 + GPIO_DOUT_X_REG;
   376		spin_lock(&sfg_lock);
   377		value = ioread32(gpio_base + offset);
   378		value &= ~(0xFF);
   379		value |= (v&0xFF);
   380		iowrite32(value, gpio_base + offset);
   381		spin_unlock(&sfg_lock);
   382	}
   383	EXPORT_SYMBOL_GPL(sf_vic_gpio_dout_value);
   384	
 > 385	void sf_vic_gpio_dout_low(int gpio)
   386	{
   387		sf_vic_gpio_dout_value(gpio, 0);
   388	}
   389	EXPORT_SYMBOL_GPL(sf_vic_gpio_dout_low);
   390	
 > 391	void sf_vic_gpio_dout_high(int gpio)
   392	{
   393		sf_vic_gpio_dout_value(gpio, 1);
   394	}
   395	EXPORT_SYMBOL_GPL(sf_vic_gpio_dout_high);
   396	
 > 397	void sf_vic_gpio_doen_reverse(int gpio, int en)
   398	{
   399		unsigned int value;
   400		int offset;
   401	
   402		if (!gpio_base)
   403			return;
   404	
   405		offset = gpio * 8 + GPIO_DOEN_X_REG;
   406	
   407		spin_lock(&sfg_lock);
   408		value = ioread32(gpio_base + offset);
   409		value &= ~(0x1 << 31);
   410		value |= (en & 0x1) << 31;
   411		iowrite32(value, gpio_base + offset);
   412		spin_unlock(&sfg_lock);
   413	}
   414	EXPORT_SYMBOL_GPL(sf_vic_gpio_doen_reverse);
   415	
 > 416	void sf_vic_gpio_doen_value(int gpio, int v)
   417	{
   418		unsigned int value;
   419		int offset;
   420	
   421		if (!gpio_base)
   422			return;
   423	
   424		offset = gpio * 8 + GPIO_DOEN_X_REG;
   425	
   426		spin_lock(&sfg_lock);
   427		value = ioread32(gpio_base + offset);
   428		value &= ~(0xFF);
   429		value |= (v&0xFF);
   430		iowrite32(value, gpio_base + offset);
   431		spin_unlock(&sfg_lock);
   432	}
   433	EXPORT_SYMBOL_GPL(sf_vic_gpio_doen_value);
   434	
 > 435	void sf_vic_gpio_doen_low(int gpio)
   436	{
   437		sf_vic_gpio_doen_value(gpio, 0);
   438	}
   439	EXPORT_SYMBOL_GPL(sf_vic_gpio_doen_low);
   440	
 > 441	void sf_vic_gpio_doen_high(int gpio)
   442	{
   443		sf_vic_gpio_doen_value(gpio, 1);
   444	}
   445	EXPORT_SYMBOL_GPL(sf_vic_gpio_doen_high);
   446	
 > 447	void sf_vic_gpio_manual(int offset, int v)
   448	{
   449		unsigned int value;
   450	
   451		if (!gpio_base)
   452			return ;
   453	
   454		spin_lock(&sfg_lock);
   455		value = ioread32(gpio_base + offset);
   456		value &= ~(0xFF);
   457		value |= (v&0xFF);
   458		iowrite32(value, gpio_base + offset);
   459		spin_unlock(&sfg_lock);
   460	}
   461	EXPORT_SYMBOL_GPL(sf_vic_gpio_manual);
   462	
   463	static int starfive_gpio_probe(struct platform_device *pdev)
   464	{
   465		struct device *dev = &pdev->dev;
   466		struct starfive_gpio *chip;
   467		struct gpio_irq_chip *girq;
   468		struct resource *res;
   469		int irq, ret, ngpio;
   470	
   471		chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
   472		if (!chip) {
   473			dev_err(dev, "out of memory\n");
   474			return -ENOMEM;
   475		}
   476	
   477		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   478		chip->base = devm_ioremap_resource(dev, res);
   479		if (IS_ERR(chip->base)) {
   480			dev_err(dev, "failed to allocate device memory\n");
   481			return PTR_ERR(chip->base);
   482		}
   483		gpio_base = chip->base ;
   484	
   485		irq = platform_get_irq(pdev, 0);
   486		if (irq < 0) {
   487			dev_err(dev, "Cannot get IRQ resource\n");
   488			return irq;
   489		}
   490	
   491		raw_spin_lock_init(&chip->lock);
   492		chip->gc.direction_input = starfive_direction_input;
   493		chip->gc.direction_output = starfive_direction_output;
   494		chip->gc.get_direction = starfive_get_direction;
   495		chip->gc.get = starfive_get_value;
   496		chip->gc.set = starfive_set_value;
   497		chip->gc.base = 0;
   498		chip->gc.ngpio = 64;
   499		chip->gc.label = dev_name(dev);
   500		chip->gc.parent = dev;
   501		chip->gc.owner = THIS_MODULE;
   502	
   503		girq = &chip->gc.irq;
   504		girq->chip = &starfive_irqchip;
   505		girq->parent_handler = NULL;
   506		girq->num_parents = 0;
   507		girq->parents = NULL;
   508		girq->default_type = IRQ_TYPE_NONE;
   509		girq->handler = handle_simple_irq;
   510	
   511		ret = gpiochip_add_data(&chip->gc, chip);
   512		if (ret) {
   513			dev_err(dev, "gpiochip_add_data ret=%d!\n", ret);
   514			return ret;
   515		}
   516	
   517		/* Disable all GPIO interrupts before enabling parent interrupts */
   518		iowrite32(0, chip->base + GPIO_IE_HIGH);
   519		iowrite32(0, chip->base + GPIO_IE_LOW);
   520		chip->enabled = 0;
   521	
 > 522		ret = devm_request_irq(dev, irq, starfive_irq_handler, IRQF_SHARED,
   523				dev_name(dev), chip);
   524		if (ret) {
   525			dev_err(dev, "IRQ handler registering failed (%d)\n", ret);
   526			return ret;
   527		}
   528	
   529		writel_relaxed(1, chip->base + GPIO_EN);
   530	
   531		dev_info(dev, "StarFive GPIO chip registered %d GPIOs\n", ngpio);
   532	
   533		return 0;
   534	}
   535	

---
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: 29988 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-22 12:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-22 12:24 [stffrdhrn:starfive-bad-dcache-flush 2/39] drivers/gpio/gpio-starfive-vic.c:522:8: error: implicit declaration of function 'devm_request_irq'; did you mean 'can_request_irq'? kernel test robot

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.