[arm-platforms:irq/gpio-immutable 21/29] drivers/gpio/gpio-mt7621.c:255:39: error: 'mediatek_gpio_irq_print_chip' undeclared; did you mean 'mediatek_irq_print_chip'?

kernel test robot lkp at intel.com
Fri Feb 11 09:59:36 PST 2022


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/gpio-immutable
head:   5bcef0d59c643b8a70398229d4e3b264d3079c48
commit: a464bf5adf64dc347b1c786351be4a8df88dcf8d [21/29] gpio: mt7621: Switch to dynamic chip name output
config: nds32-randconfig-r023-20220211 (https://download.01.org/0day-ci/archive/20220212/202202120045.xNOMcTC6-lkp@intel.com/config)
compiler: nds32le-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://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=a464bf5adf64dc347b1c786351be4a8df88dcf8d
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms irq/gpio-immutable
        git checkout a464bf5adf64dc347b1c786351be4a8df88dcf8d
        # 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=nds32 SHELL=/bin/bash drivers/gpio/

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

All errors (new ones prefixed by >>):

   drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_bank_probe':
>> drivers/gpio/gpio-mt7621.c:255:39: error: 'mediatek_gpio_irq_print_chip' undeclared (first use in this function); did you mean 'mediatek_irq_print_chip'?
     255 |         rg->irq_chip.irq_print_chip = mediatek_gpio_irq_print_chip;
         |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                       mediatek_irq_print_chip
   drivers/gpio/gpio-mt7621.c:255:39: note: each undeclared identifier is reported only once for each function it appears in
   At top level:
   drivers/gpio/gpio-mt7621.c:192:13: warning: 'mediatek_irq_print_chip' defined but not used [-Wunused-function]
     192 | static void mediatek_irq_print_chip(struct irq_data *d, struct seq_file *p)
         |             ^~~~~~~~~~~~~~~~~~~~~~~


vim +255 drivers/gpio/gpio-mt7621.c

   216	
   217	static int
   218	mediatek_gpio_bank_probe(struct device *dev, int bank)
   219	{
   220		struct mtk *mtk = dev_get_drvdata(dev);
   221		struct mtk_gc *rg;
   222		void __iomem *dat, *set, *ctrl, *diro;
   223		int ret;
   224	
   225		rg = &mtk->gc_map[bank];
   226		memset(rg, 0, sizeof(*rg));
   227	
   228		spin_lock_init(&rg->lock);
   229		rg->bank = bank;
   230	
   231		dat = mtk->base + GPIO_REG_DATA + (rg->bank * GPIO_BANK_STRIDE);
   232		set = mtk->base + GPIO_REG_DSET + (rg->bank * GPIO_BANK_STRIDE);
   233		ctrl = mtk->base + GPIO_REG_DCLR + (rg->bank * GPIO_BANK_STRIDE);
   234		diro = mtk->base + GPIO_REG_CTRL + (rg->bank * GPIO_BANK_STRIDE);
   235	
   236		ret = bgpio_init(&rg->chip, dev, 4, dat, set, ctrl, diro, NULL,
   237				 BGPIOF_NO_SET_ON_INPUT);
   238		if (ret) {
   239			dev_err(dev, "bgpio_init() failed\n");
   240			return ret;
   241		}
   242	
   243		rg->chip.of_gpio_n_cells = 2;
   244		rg->chip.of_xlate = mediatek_gpio_xlate;
   245		rg->chip.label = devm_kasprintf(dev, GFP_KERNEL, "%s-bank%d",
   246						dev_name(dev), bank);
   247		if (!rg->chip.label)
   248			return -ENOMEM;
   249	
   250		rg->chip.offset = bank * MTK_BANK_WIDTH;
   251		rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask;
   252		rg->irq_chip.irq_mask = mediatek_gpio_irq_mask;
   253		rg->irq_chip.irq_mask_ack = mediatek_gpio_irq_mask;
   254		rg->irq_chip.irq_set_type = mediatek_gpio_irq_type;
 > 255		rg->irq_chip.irq_print_chip = mediatek_gpio_irq_print_chip;
   256	
   257		if (mtk->gpio_irq) {
   258			struct gpio_irq_chip *girq;
   259	
   260			/*
   261			 * Directly request the irq here instead of passing
   262			 * a flow-handler because the irq is shared.
   263			 */
   264			ret = devm_request_irq(dev, mtk->gpio_irq,
   265					       mediatek_gpio_irq_handler, IRQF_SHARED,
   266					       rg->chip.label, &rg->chip);
   267	
   268			if (ret) {
   269				dev_err(dev, "Error requesting IRQ %d: %d\n",
   270					mtk->gpio_irq, ret);
   271				return ret;
   272			}
   273	
   274			girq = &rg->chip.irq;
   275			girq->chip = &rg->irq_chip;
   276			/* This will let us handle the parent IRQ in the driver */
   277			girq->parent_handler = NULL;
   278			girq->num_parents = 0;
   279			girq->parents = NULL;
   280			girq->default_type = IRQ_TYPE_NONE;
   281			girq->handler = handle_simple_irq;
   282		}
   283	
   284		ret = devm_gpiochip_add_data(dev, &rg->chip, mtk);
   285		if (ret < 0) {
   286			dev_err(dev, "Could not register gpio %d, ret=%d\n",
   287				rg->chip.ngpio, ret);
   288			return ret;
   289		}
   290	
   291		/* set polarity to low for all gpios */
   292		mtk_gpio_w32(rg, GPIO_REG_POL, 0);
   293	
   294		dev_info(dev, "registering %d gpios\n", rg->chip.ngpio);
   295	
   296		return 0;
   297	}
   298	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



More information about the linux-arm-kernel mailing list